Monday, March 19, 2012

Access 2000 Frontend MS SQL 2000 backend - Locking Problems

We are using an Access 2000 project to view our SQL Tables and using Access 2000 Runtime to Access the forms in the project. We have written in a locking system in VB and removed the video controls to prevent users from accessing the same records. But of course now we need to make the video controls available. This has now thrown up the problem of multiple users accessing the same records. We have tried to write code to lock records when then video controls are used but this is not working as well as we hoped. Can anyone please suggest any way of setting up locking on SQL using triggers from the Access frontend? or any other types of locking systems that could be written in the Access front end.

The safest and easiest way to use locks having to do with SQL Server in a distributed application is to use SQL Server locks themselves. See the links below for information on how SQL Server locks work and how to use them.

http://msdn2.microsoft.com/en-us/library/ms189857.aspx

http://www.informit.com/articles/article.aspx?p=26657&rl=1

http://www.mssqlcity.com/Articles/Adm/SQL70Locks.htm

http://www.databasejournal.com/features/mssql/article.php/3289661

http://www.sql-server-performance.com/articles/per/advanced_sql_locking_p1.aspx

http://blog.sqlauthority.com/2007/04/27/sql-server-2005-locking-hints-and-examples/

Hope that helps,

John

No comments:

Post a Comment