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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 Other Forums
 MS Access
 Lock sql table
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

6 Posts

Posted - 01/15/2013 :  09:38:29  Show Profile  Reply with Quote
I have a accessdb that connects to a MS SQL 2012.
I the creation of a report, I fill data to a table T after deleting the previus content. Then manipulates these data in T and creating the report.
But if 2 or more users do this at the same time the T is currupted.

Can I lock the table T and release the lock after use?


James K
Flowing Fount of Yak Knowledge

3873 Posts

Posted - 01/15/2013 :  10:04:51  Show Profile  Reply with Quote
You can lock the table but a better option may be to use a temporary table. Temporary tables are scoped to the session that created it, so multiple users can use the same temporary table name and they will not interfere with each other. (I am of course assuming that the source data used to populate the temporary table is not altered by the reporting queries).
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000