Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Database shared on a LAN

Posted on 2002-03-12
3
Medium Priority
?
134 Views
Last Modified: 2010-05-02
I'm developing a app that will access a LAN database. 50 people will be using this database. How can I allow only one person at a time to update a particular record. Do I need to temporarily lock the record or what?
0
Comment
Question by:Gmoney
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 200 total points
ID: 6858901
> Do I need to temporarily lock the record
or what?

yes, if you're using ado here are your lock options:

adLockReadOnly Default. Read-only—you cannot alter the data.
adLockPessimistic Pessimistic locking, record by record—the provider does what is necessary to ensure successful editing of the records, usually by locking records at the data source immediately upon editing.
adLockOptimistic Optimistic locking, record by record—the provider uses optimistic locking, locking records only when you call the Update method.
adLockBatchOptimistic Optimistic batch updates—required for batch update mode as opposed to immediate update mode.
0
 

Author Comment

by:Gmoney
ID: 6859654
bobbit31, I'm using the Data control. What do I need to do to lock the current record that is being edited?
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6860921
are you using the ADO data control? it's better than the normal data control and you can set the locktype.

under projects/components, select Microsoft ADO Data Control.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month11 days, 4 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question