至少一个参数没有被指定值,大家帮忙看下
connection对象:
option explicit
dim conn,connstr,db
db= "Database.asp "
set conn = Server.CreateObject( "ADODB.Connection ")
connstr= "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= " & Server.MapPath(db)
conn.Open connstr
recordset对象:
dim sor,rs,sql
sor=trim(request( "keywords "))
set rs=server.createobject( "adodb.recordset ")
sql= "select * from db1 where xm= " &sor
rs. open sql, conn, 1, 1 ***
出错的是加“***”的行
各位帮忙看看是哪里出错了,一直改不过来
------解决方案--------------------sql= "select * from db1 where xm= ' " &sor& " ' "
------解决方案-------------------- sql= "select * from db1 where db1.xm= ' "&sor& " ' "
'sql= "select * from db1 where db1.xm= '于佳 ' "
'rs. open sql, conn,1,1
response.write(sql)
看运行结果