I am wondering how to find a specific record using an active connection.
I want to move directly to record 30 (or the current user's PK) to check for a valid password entry, and if valid then change the password while only in one connection to the database.
My current connection consists of this:
<!-- #include file="adovbs.inc" -->
<%
Dim oldPassword, newPassword
Set conn = Server.CreateObject("ADODB.Connection"
conn.Open connString
Set rs = Server.CreateObject("ADODB.Recordset"
rs.CursorLocation = adUseServer
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Open "users", conn, , , adCmdTable
If oldpassword = rs("userPassword" Then
rs("userPassword" = newPassword
End If
rs.Close : conn.Close
Set rs = Nothing : Set conn = Nothing
%>
Does anyone know how to move directly to a record to verify and change the field without using rs.MoveNext to check every row to see if it equals the desired number?
Thanks in advance.
-Ovatvvon :-Q
I want to move directly to record 30 (or the current user's PK) to check for a valid password entry, and if valid then change the password while only in one connection to the database.
My current connection consists of this:
<!-- #include file="adovbs.inc" -->
<%
Dim oldPassword, newPassword
Set conn = Server.CreateObject("ADODB.Connection"
conn.Open connString
Set rs = Server.CreateObject("ADODB.Recordset"
rs.CursorLocation = adUseServer
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Open "users", conn, , , adCmdTable
If oldpassword = rs("userPassword" Then
rs("userPassword" = newPassword
End If
rs.Close : conn.Close
Set rs = Nothing : Set conn = Nothing
%>
Does anyone know how to move directly to a record to verify and change the field without using rs.MoveNext to check every row to see if it equals the desired number?
Thanks in advance.
-Ovatvvon :-Q