-
Database lock
I have a program that are multi-user and one of the window open data that are in a database. I have a button. If I click on it it put all the textbox enable to true and user can edit and save. When save, textbox become enable false.
What I want is when the user click the button to enable true the textbox to be able to lock the table that he will save the new data. And when he will save withe the save button I want to put back the table available to be written to everybody.
How do I do that?
-
I suggest you use ADO.
Record locking/unlocking is handled easily using ado Locktype parameters during opening of a recordset.
read about adLockpessimistic,adLockOptimistic, etc. in VB help.
-
The problem is that I use db.execute (db is the Database object) to do most of my Edit/Insert so db.lockedit = true doesn't work!!