PDA

Click to See Complete Forum and Search --> : Locking records


parkes
Nov 9th, 1999, 04:26 PM
I'm using VB6 and Access 97 with ADO

I've got a multi user application and I've got a button marked [Edit]. I want to put some kind of trap there so that they cannot edit this record if it is already open, but having no luck, can anyone point me in the right direction.

I've opened the table using Pessimistic Mode

------------------
Thanks in advance for any help provided.

Mongo
Nov 11th, 1999, 09:38 AM
Put on your DBA hat for a minute and consider the effect of holding locks for an arbitrarily long period of time in a distributed application. Hmmm, it's an opportunity for nashing teeth and putting egg on the developer's face. Avoid using the pessimistic mode at all costs -- especially if you're leaving the keys to the lock in the hands of the end-user... who, oh, he went to lunch an hour ago and will finish that edit when he gets back from vacation. Sorry, I'm sounding too flippant. The truth is: I've been there, done that and I have the t-shirt to prove it. I can't tell you enough: do not to do it. Instead, with the sleek elegance of VB6 & ADO, take a look at:
http://support.microsoft.com/download/support/mslfiles/ATL2ADO.exe