: im having problem with this code its not redirecting .. the record set's current count is -1 no rows are returning from db...plz a quivk help is required
:
: <%
: id=request.form("usr")
: sec=request.form("pwd")
: 'response.write(id)
: 'response.write(sec)
: set con=Server.createobject("Adodb.connection")
: set rs=Server.createobject("Adodb.recordset")
: con.open "DSN=test;usr=;pwd=;"
: sql="select * from user where userid='"&id&"' and pass='"&sec&"'" //////"'this is the query..."\\\\\\
rs.Open sql,con,2,3
:
: if (rs.recordcount > 0) then
: Session("auth")="allow"
: response.redirect("success.asp")
: else
: response.redirect("error.asp")
: end if
: %>
:
Change the rs.open statement as shown.The default cursor type might not be supporting the recordcount.The "2,3" thing is I *think* adOpenDynamic and adLockOptimistic . Can't really remember that thing

.
If that doesn't work ,try setting
rs.cursorLocation=adUseClient before opening the resordset.
to use the adUseClient ,you will have to include the file "adovbs.inc".If you look in that file you will also see what 2,3 stands for and what the magic number for adUseClient is.Try it and let us know