Board index » off-topic » how to prevent transaction from locking my table

how to prevent transaction from locking my table


2004-08-11 05:11:36 PM
off-topic18
Hi
I'm using BCB5 with MSACCESS and BDE.
I have an application that starts a transaction. inserts a record in a table
and allows the user to alter fields in the new record.
The new record gets commited when the user clicks on the save button or is
erased when the user clicks on the Close button on the form.
My problem is that the moment the user is busy with the form a lock is
created on the table and none of my other users can access that particular
form or table!! Is this the way a transaction is supposed to work? How can I
overcome this problem because more that one person must be able to work on
that particular table and form.
Thanks
Tim
 
 

Re:how to prevent transaction from locking my table

Tim wrote:
Quote
Hi
I'm using BCB5 with MSACCESS and BDE.
I have an application that starts a transaction. inserts a record in a table
and allows the user to alter fields in the new record.
The new record gets commited when the user clicks on the save button or is
erased when the user clicks on the Close button on the form.
My problem is that the moment the user is busy with the form a lock is
created on the table and none of my other users can access that particular
form or table!! Is this the way a transaction is supposed to work?
Yes, I think that's one of the reasons they came up with transaction.
They encapsulate actions on a database, to guarantee consistency of
data. Please do look transactions up on the internet or your local
library.
Quote
How can I
overcome this problem because more that one person must be able to work on
that particular table and form.

You might want to check if MSAccess allows a record level lock, that
means only one user can work on a record at a time, but they can work on
different records of the same table... I recall that it kind of doesn't
though. Check MSAcess' help file for transactions and locks.
Quote
Thanks
Tim

--
Dipl. Inform. Sabine Dinis Blochberger (FH)
Op3racional
s.blochberger @ op3racional.de