 |
|
 |
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1617
|
Re: Help for Multiuser VB Application
Changing how the record is opened (locked) by the recordset would help (copied from online, but VB will give you the choices):
adLockUnspecified -1 Unspecified type of lock. Clones inherits lock type from the original Recordset.
adLockReadOnly 1 Read-only records
adLockPessimistic 2 Pessimistic locking, record by record. The provider lock records immediately after editing
adLockOptimistic 3 Optimistic locking, record by record. The provider lock records only when calling update
adLockBatchOptimistic 4 Optimistic batch updates. Required for batch update mode
Of course you could always do something to have a lot more control over it -- add a field to the database that tells what it's status is. That way, when a user opens the record, you'd also update the record to contain a value to tell you whether it's opened, being edited, etc ---- but you'd still want to lock the record with like the pessimistic or optimistic way.
____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)
|
|
22-12-2006 at 08:23 PM |
|
|
arian44 Level: Trainee
 Registered: 21-12-2006 Posts: 3
|
Re: Help for Multiuser VB Application
Thanx for reply please can you send me a sample application for help....
|
|
24-12-2006 at 06:05 PM |
|
|
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1617
|
Re: Help for Multiuser VB Application
Well, there's not really an application for it, it's just one line of code.
The line where you open up the table, the lock method (that's optional) is just set.
If it's a control, there's most likely a lock method on it in the properties (but for reports, it's probably set to read only since you don't change a value in a report).
____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)
|
|
27-12-2006 at 08:47 PM |
|
|
|
|
 |
 |