Friday, April 23, 2010

ADODB.Recordset error '800a0cb3'

Issue:

ADODB.Recordset error '800a0cb3'
Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.

Root cause:

rsSearch.Open Session("varSQL"), objConnection, _
   'adOpenStatic, adLockReadOnly, adCmdText

rsSearch.AbsolutePage = CInt(Session("CurrPageNo"))

Fix: add CursorLocation property

Set rsSearch = Server.CreateObject("ADODB.Recordset")
  with rsSearch
    .CursorLocation = 3 'adUseClient   
    .Open Session("varSQL"), objConnection, _
        adOpenStatic, adLockReadOnly, adCmdText   
end with

rsSearch.AbsolutePage = CInt(Session("CurrPageNo"))

No comments: