Group:  Microsoft Access ยป microsoft.public.access.multiuser
Thread: determining if any records being edited

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

determining if any records being edited
"jb" <sbormail[ at ]yahooNOSPAM.com> 31.08.2006 03:21:26
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


Re: determining if any records being edited
"Mary Chipman [MSFT]" <mchip[ at ]online.microsoft.com> 11.09.2006 15:46:54
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
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net