Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Current Recordset does not support bookmarks ....".

Status
Not open for further replies.

cyberbiker

Programmer
Mar 16, 2001
431
US
I am trying to use the book mark property of a record set and I receive the error "Current Recordset does not support bookmarks ....". I am using SQl Server 7 tables, opening the recordset dynamically
If I am reading everything correctly a dynamic curser supports bookmarks.

The code I use to create the recordset is:

Public Function fOpenDynamicRS(ByVal strS As String, Optional con As ADODB.Connection, Optional ByVal locking As ADODB.LockTypeEnum = adLockOptimistic) As ADODB.Recordset
'opens dynamic recordset
' first check to see if we have passed a different connection string other
'than Boss default if not then use BossCN
'If con.ConnectionString = "" Then
If con Is Nothing Then
Set con = BossCN
End If
'now be certain that nothing has happened to the connection
If con.State = adStateOpen Then
Set fOpenDynamicRS = New ADODB.Recordset
fOpenDynamicRS.Open strS, con, adOpenDynamic, locking

Else
ERR.Raise 911, , "Database Connection not open " & Chr$(10) + Chr$(13) & _
con & Chr$(10) & Chr$(13) & _
strS
End If
End Function


BossCN is the open ADO connection and strS is the SQL statement.

Obviously, I am missing something, but what?

I am also cross posting this to the VB database forum and the SQL forum.

Thanks Terry (cyberbiker)
 
Forward-only and dynamic cursors do not support the use of bookmarks. You can use the Supports property of the recordset to determine if it supports bookmarks. You'll have to open the recordset with adOpenKeyset or adOpenStatic in order to use...

Mark
 
Thanks Mark, just found that out from the other posting. Thanks for the help Terry (cyberbiker)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top