TorrediPisa
Programmer
Hello People
I have made a VB application where I want to delete a certain numbers of records from a .Mdb Table and then to insert some others. In practice I have two sequential transactions:
(let's suppose an ADO Connection)
cnADO.execute “DELETE FROM TBL1 WHERE FLD_1 = ‘X’”
cnADO.execute “INSERT INTO TBL1 (FLD1, FLD2, ...) VALUES ..
Here is what happens: if the first execute lasts a bit, the second execute starts and begins to insert data which are deleted by the first execute still running.
The final result is that some of the records inserted are indeed deleted.
Could you suggest a good solution for this problem?
Thank you very much for yr help.
Regards
TdP
I have made a VB application where I want to delete a certain numbers of records from a .Mdb Table and then to insert some others. In practice I have two sequential transactions:
(let's suppose an ADO Connection)
cnADO.execute “DELETE FROM TBL1 WHERE FLD_1 = ‘X’”
cnADO.execute “INSERT INTO TBL1 (FLD1, FLD2, ...) VALUES ..
Here is what happens: if the first execute lasts a bit, the second execute starts and begins to insert data which are deleted by the first execute still running.
The final result is that some of the records inserted are indeed deleted.
Could you suggest a good solution for this problem?
Thank you very much for yr help.
Regards
TdP