cyberbiker
Programmer
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)
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)