ASP: Rowset position cannot be restarted.
Could not get the damn objRs.MoveFirst() to work, it would error out with "Rowset position cannot be restarted." no matter what combination of cursor type and locking I had.
....snip
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS = objCommand.Execute
'http://stackoverflow.com/questions/14122308/rowset-does-not-support-scrolling-backward
....snip
If Not objRs.EOF Then
Do While Not objRs.EOF
CLIENTCOUNT_TOTAL = CLIENTCOUNT_TOTAL + 1
objRs.MoveNext()
Loop
'objRs.MoveFirst() 'orig
'did it this way
'http://www.webassist.com/forums/posts.php?id=22249 to use the close and reopen
objRs.Close
Set objRS = objCommand.Execute 'added since i was getting an error "Rowset position cannot be restarted."
End If
....snip
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS = objCommand.Execute
'http://stackoverflow.com/questions/14122308/rowset-does-not-support-scrolling-backward
....snip
If Not objRs.EOF Then
Do While Not objRs.EOF
CLIENTCOUNT_TOTAL = CLIENTCOUNT_TOTAL + 1
objRs.MoveNext()
Loop
'objRs.MoveFirst() 'orig
'did it this way
'http://www.webassist.com/forums/posts.php?id=22249 to use the close and reopen
objRs.Close
Set objRS = objCommand.Execute 'added since i was getting an error "Rowset position cannot be restarted."
End If
Comments
Post a Comment