connstr= "provider=oraoledb.oracle.1;persist security info=true;user id=sa;password=sa;data source=app"
set conn=createobject(adodb.connection)
set rs=createobject(adodb.recordset)
conn.open connstr
rs.open "users",conn,1,3
sql=" loginname='" & strloginname & " ' and " & "password='" & strpassword & "'"
rs.find sql
if rs.eof then
response.write "not found the record!"
else
Response.Redirect "signedOn.asp?ID=" & Session("ID")
end if
执行到rs.find sql 时,提示:
800A01b6(对象不支持这个属性或方法)我的os为winxp.
---------------------------------------------------------------
sql=" loginname='" & strloginname & " ' and " & "password='" & strpassword & "'"
你的sql语句正确么??少了关键字select、from之类的吧
如果不行,建议换种方式:
connstr= "provider=oraoledb.oracle.1;persist security info=true;user id=sa;password=sa;data source=app"
set conn=createobject(adodb.connection)
conn.open connstr
set rs=createobject(adodb.recordset)
sql="select * from users where loginname='" & strloginname & " ' and password='" & strpassword & "'"
rs.open sql,conn,1,3
if rs.eof then
response.write "not found the record!"
else
Response.Redirect "signedOn.asp?ID=" & Session("ID")
end if
---------------------------------------------------------------
connstr= "provider=oraoledb.oracle.1;persist security info=true;user id=sa;password=sa;data source=app"
set conn=createobject(adodb.connection)
conn.open connstr
set rs=createobject(adodb.recordset)
sql="select * from users where loginname='" & strloginname & " ' and password='" & strpassword & "'"
rs.open sql,conn
if rs.eof then
response.write "not found the record!"
else
Response.Redirect "signedOn.asp?ID=" & Session("ID")
end if