Soundsmith
Programmer
I'm writing an archive function. Records to be archived are copied into a temporary holding table to verify. When I select the 'Archive' command button, I want to do the following:
Lock all records scheduled for archive (could be 1 or 100, but not 1000)
if ALL records lock
copy the temporary tables to the archive database
if copy successful
delete records from main table
if deletion successful
delete temp table
If any portion fails, I can recover the records from the temp area and/or delete from the archive or main tables
the question is, how do I lock multiple records without locking the entire table(s)?
I don't think this is a candidate for transaction processing, (I'm operating directly on the tables, not recordsets) but maybe it is?
Thanks David 'Dasher' Kempton
The Soundsmith
Lock all records scheduled for archive (could be 1 or 100, but not 1000)
if ALL records lock
copy the temporary tables to the archive database
if copy successful
delete records from main table
if deletion successful
delete temp table
If any portion fails, I can recover the records from the temp area and/or delete from the archive or main tables
the question is, how do I lock multiple records without locking the entire table(s)?
I don't think this is a candidate for transaction processing, (I'm operating directly on the tables, not recordsets) but maybe it is?
Thanks David 'Dasher' Kempton
The Soundsmith