|
-
Jan 19th, 2004, 04:36 AM
#1
Thread Starter
Addicted Member
MS-SQL table access [RESOLVED]
My App works with an MS SQL DB; the DB is manipulated (Updates, Inserts, Deletes) by a number of applications so I need a away of detecting whether a table is locked, and if it is waiting and retrying.
Any ideas would be welcome.
Last edited by mik706; Jan 20th, 2004 at 03:11 AM.
Mik706
-
Jan 19th, 2004, 04:45 AM
#2
Hi there,
My suggestion to you is lookup the underlying value property of the ADO recordset to find out if someone has changed anything.
Cheers,
Abhijit
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Jan 19th, 2004, 04:49 AM
#3
Thread Starter
Addicted Member
I am not looking to see if the table has changed.
If another application has locked the table and I try and lock the table an error is generated because I cannot open the table exclusively. I would like to know the best way to trap this error.
-
Jan 19th, 2004, 05:12 AM
#4
Ok. Do an On Error Resume Next before using the table. Check for the error code. If it contains a number, it indicates that the table is locked. You will have some specific error code for locked tables.
Cheers,
Abhijit
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Jan 19th, 2004, 05:21 AM
#5
Thread Starter
Addicted Member
i am currently using an On Error Resume Next statment but i was wondering if ther was a better way of doing it. ie a specific test that can be performed to find the state of a table.
-
Jan 19th, 2004, 08:15 AM
#6
I don't think so. You have to check for the error being raised, and handle it.
-
Jan 19th, 2004, 11:27 PM
#7
Just a question folks, how do you simulate a locked table in MS ACCESS?
Cheers,
Abhijit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|