donmateo
10-28-2008, 08:17 PM
Hey Guys,
I am trying to set the CursorType and LockType of the recordset object in the below code. I am using the Open method to set both properties. After I call the method the properties are being reset. Any ideas?
Source:
cmd.ActiveConnection = getConn()
cmd.CommandType = adcmdStoredProc
cmd.CommandText = "spDemoGetQuestions"
cmd.Parameters.Append cmd.CreateParameter("demogroup",adInteger,adParamInput,,DemoGroup)
rs.Open cmd,,adOpenKeyset,adLockOptimistic
response.Write("ct: " & rs.CursorType & "<br />")
response.Write("lt: " & rs.LockType & "<br />")
response.Write("rc: " & rs.RecordCount & "<br />")
Output:
ct: 0
lt: 1
rc: -1
Thanks
I am trying to set the CursorType and LockType of the recordset object in the below code. I am using the Open method to set both properties. After I call the method the properties are being reset. Any ideas?
Source:
cmd.ActiveConnection = getConn()
cmd.CommandType = adcmdStoredProc
cmd.CommandText = "spDemoGetQuestions"
cmd.Parameters.Append cmd.CreateParameter("demogroup",adInteger,adParamInput,,DemoGroup)
rs.Open cmd,,adOpenKeyset,adLockOptimistic
response.Write("ct: " & rs.CursorType & "<br />")
response.Write("lt: " & rs.LockType & "<br />")
response.Write("rc: " & rs.RecordCount & "<br />")
Output:
ct: 0
lt: 1
rc: -1
Thanks