|
-
Nov 6th, 2001, 10:25 AM
#1
Thread Starter
Lively Member
About disconnected recordset
Hi all,
I wrote the following code and want to delete the filtered records from the disconnectd recordset. But when "rstb.Delete adAffectGroup" is executed, error occured saying ---> operation is not allowed in this context. What have i done wrong? Could any one please hep me? Thanks!
Dim rsta As ADODB.Recordset
Set rsta = New ADODB.Recordset
Dim rstb As ADODB.Recordset
With rsta
.ActiveConnection = "dsn=Test1"
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.LockType = adLockBatchOptimistic
.Open "select * from test1"
Set .ActiveConnection = Nothing
End With
Set rstb = rsta.Clone()
rstb.Filter = "name <> 'z'"
rstb.Delete adAffectGroup
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|