|
-
Nov 25th, 2000, 05:49 PM
#1
Thread Starter
Lively Member
Hi,
I'm using ADODB.recordset and I want to delete specific records from my recordset.
I know how to do this in SQL but I'm unsure of how to do it with recordsets.
Can anyone help?
H.
 Just trying to muddle through...
-
Nov 27th, 2000, 04:12 AM
#2
Thread Starter
Lively Member
Does anyone have any ideas on how to do this?
I want to be able to delete all records where the name = "example" from a recordset.
H.
 Just trying to muddle through...
-
Nov 27th, 2000, 04:40 AM
#3
Hyperactive Member
You can open a recordset with an SQL DELETE function as the record source or- On your recordset use the filter property to just select the ones you want to delete and delete them all-
recordset.Filter = "Field = 'example'"
remember to turn the filter off afterwards to return to the ful recordset-
recordset.filter=""
Regards
Chris
-
Nov 27th, 2000, 04:45 AM
#4
Thread Starter
Lively Member
 Just trying to muddle through...
-
Nov 27th, 2000, 04:47 AM
#5
Hyperactive Member
Sorry my last reply was misleading.
the first option should have said execute the SQL on the connection- e.g
sqlString = "DELETE * FROM table WHERE [field] = 'example';"
database.Connection1.Execute sqlString
-
Nov 27th, 2000, 05:13 AM
#6
PowerPoster
To do this with recordset, i think you need to locate the record location first by the FindFirst method then follow by the delete method in you recordset object.
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
|