SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 Other Forums
 MS Access
 Lock sql table
 New Topic  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

3865 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  
 New 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.06 seconds. Powered By: Snitz Forums 2000