|
-
Nov 9th, 1999, 05:29 PM
#1
Thread Starter
Hyperactive Member
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.
-
Nov 10th, 1999, 08:54 PM
#2
Addicted Member
Use Lockedit
------------------
-
Nov 10th, 1999, 09:18 PM
#3
Thread Starter
Hyperactive Member
Cannot use Lockedit with ADO I'm afraid.
------------------
Thanks in advance for any help provided.
-
Nov 10th, 1999, 09:46 PM
#4
This is from MSDN:
Using Recordset Locking
You use exclusive mode to lock an entire database. You use recordset locking, on the other hand, to specify locking for an entire table in a shared database. You can specify a read lock to prevent other users from reading records in the table, a write lock to prevent other users from editing records in the table, or both. ADO and OLE DB don't currently support this kind of locking, so you must use DAO code if you require recordset locking. Recordset locking applies only to DAO table- and dynaset-type Recordset objects; it can't be used with DAO snapshot-type or forward-only – type Recordset objects, because these are inherently read-only objects. To implement recordset locking, Microsoft Jet places shared table-read and shared table-write locks.
After you open the database in shared mode, you can implement recordset locking by specifying either of the dbDenyRead and dbDenyWrite constants in the Options argument of the DAO OpenRecordset method. You can also combine both constants by using the plus (+) operator if you want to apply both read and write locks to the table.
I'm afraid you stock with DAO.
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
[This message has been edited by Serge (edited 11-11-1999).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|