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

Clearing an Adodc1 error?

Status
Not open for further replies.

MikeCox

Programmer
Jun 4, 2001
340
US
Hi!

I'm using an Ado data control to connect to a multi-relational database. I am not enforcing cascade update/delete. If the user tries to delete a record that contains children, the Ado (or DB engine?) generates an error. I've trapped this error and given the user a descriptive message, but after this error has taken place, I cannot perform ANY recordset operations on the Ado. If I do, the Err.Description says "Operation is not allowed in this context", followed by a terminal choke. I noticed Adodc1.Recordset.State is 1 before and after the error. Adodc1.Recordset.Status is 0 before the error, and 262144 after. Unfortunately the Status is read-only, so I can't set it back to 0. Is there any other way to reset the Ado after this happens? Thanks!

-Mike
Difference between a madman and a genius:
A madman uses his genius destructively,
A genius uses his madness constructively.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top