Instead of looping through the records, try using an explicit transaction and set a timeout. You can check for errors and either commit or rollback. You could put it in a loop so that if it times out and rolls back you restart the transaction.
--Mary
On Wed, 30 Aug 2006 23:21:26 -0400, "jb" <sbormail[ at ]yahooNOSPAM.com> wrote:
[Quoted Text] >Hello, >I need to figure a way of determining if any records in a table are being >edited before running a few different update routines on the table (Access >2000, program MDB on local C, data MDB on network drive). I have a form >that lists out all the records in a small table (<200) and different >machines can edit different records. At a particular time, I need to >compare and update these records based on a new set of data I query out of a >SQL server database. I do not want to run the routines (which are an Update >query on the whole table and a do while loop on each record in the table). >Any ideas on how to do this? I thought of maybe trying to issue an >OpenRecordset command with dbDenyWrite + dbDenyRead as Options and then test >if Err=0 or not. If not 0, then someone is editing a record. If = 0, I >would close and reopen recordset normally and do my stuff. Sounded like a >plan but I do not know if this would work. Any thoughts? > >Thanks, > >John >
|