Board index » Visual Studio » Flushing Deletes in a CRecordSet?
|
DXRick
|
Flushing Deletes in a CRecordSet?
Visual Studio380
Hi all, I'm using CRecordSets to do updates on a MS Access database. There are 2 tables in the DB with one of the columns of table 1 being a foreign key to table 2 (this is enforced by MS Access by specifying the Relationships of the tables). When I do: - table1 delete all records with column 1 value ID x - table2 delete record with primary key ID x I get an CDBException (originating in MS Access) stating that I can't delete the record in table 2 because table 1 still has links to that record. If I just put a breakpoint after the deleting of the records in table1 and then continue running I don't get the error. So it seems that MS Access doesn't process my Deletes in a synchonised way. Can this be? Is there a way to enforce this synchronisation? (I tried putting a BeginTrans and CommitTrans around the deleting of the records in table1, but even CommitTrans doesn't seem to be synchronised.) crimson13 - |
