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

Comments

Popular posts from this blog

Asp.net Publishing Broke Site - "App_WebReferences is not allowed because the application is precompiled"

Telerik - Custom Group Footers In RadGrid