Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Locking

Author  Topic 

Manoj Kayastha
Starting Member

3 Posts

Posted - 2002-06-19 : 08:14:57
Dear friends,

I am developing an application using frontend MS Access 2002 and backend SQL 2000. There are two forms. In one form, there is listbox of Projects and after select the project, it could be view,updated detail of selected project and there is also option, it could be delete the selected project. To delete, I call the store procedure.

Another form is view form. Its record source is table. I want to develop the lock system while One user Viewing,adding,editing or updating the project that specific project could not be delete or update by other user, but it could be viewed.

I consult SQL Books. There are a lot of different ways of locking system. Please show me better specific way of locking system for above problem. It will help me a lot.

with best regards!
manoj

SMerrill
Posting Yak Master

206 Posts

Posted - 2003-05-12 : 13:10:06
Here is a suggestion that only works when your user interface is the only interface to the data that is being used.
Maintain your own private locking in a custom table that you created.
Make sure you put a user name in the table so you can know who is locking the table.

There are two user names available: Access username and Network username. If somehow you find identical usernames you must make up a random number upon starting the application for each user.

On View/Add/Edit you must place a locking record in your table.
On end of View/Add/Edit you must remove the locking record from your table.

Within your stored procedure for deleting, read your custom table to see if deletion is permitted. If not, beep at the user.



--SMerrill
Seattle, WA

Edited by - smerrill on 05/12/2003 13:11:43
Go to Top of Page
   

- Advertisement -