|
-
Apr 17th, 2002, 02:32 AM
#1
Thread Starter
New Member
2 birds with 1 stone?
i have a question. is it possible to lock the same record in different forms in VB with only 1 active connection to the database?
the senario is like this:
i have an application with 2 (or more) forms which allow users to add, change & delete records from a database. when the users want to edit a record, it will be locked when they select the record they want to edit. the other user won't be able to change the records. this is fine with one active connection.
but what if i want to make sure that both forms cannot edit the same record? is it possible to lock the record (using ADODB.Recordset) in form A and return an error that say the record is locked when form B tries to lock it (all this done with only one connection)? thanks.
-
Apr 17th, 2002, 02:56 AM
#2
If you are using ADO check the following properties on the recordset....
- EditMode
- State
I think these change as you lock the recordset and you'd need some code to check them. Experiment and let us know ok ?
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
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
|