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

Locking multiple records in several tables

Status
Not open for further replies.

Soundsmith

Programmer
Feb 21, 2001
84
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top