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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting a Record From an ADO Recordset 1

Status
Not open for further replies.

jerjim

Programmer
Jan 4, 2001
85
PH
When I try to delete a record from an ADO recordset, I get the error
"Insufficient key column information for updating or refreshing"

Prior to the delete method,
I have already filtered the recordset so that it contains only one record,
the record I want to delete.

The lines of code are:
With rst
.filter = "filter expression"
.delete
.update
.requery
end with

The error occurs when I call the .delete method.
 
First check if the recordset supports delete or not (
Code:
rs.supports(adDelete)
) and if it does, check the errors collection for more information.

The code looks fine to me, except I would be more implicit about the delete method (using adAffectGroup), but it should work nevertheless.

To me this looks like a problem when you connect to the database, or in the way that you retrieve the data.

Good Luck
-Mats Hulten
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top