By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 985 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

How to "unlock" table in error handler routine?

P: n/a
Is there a way to unlock a table so a subroutine can complete?
frmMain!frm0 has got a lock on a table I need to do stuff with.

Error Number 3211: The database engine could not lock table 'tblRecords'
because it is already in use by another person or process.

I've tried this:

HandleErr:
Select Case Err.Number
Case 3211 'could not lock table
Forms!frmMain!frm0.Requery
Resume Next
Case Else
modHandler.LogErr (Me.Form.Name)
Resume Exit_Here
End Select
End Sub

But I get other errors... is there a better way to "unlock" tblRecords?
What does it mean when a table is locked, anyway?

Thanks!
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I have a multi-user app in which a function generates job numbers. The
function to get a new job number tests to see if the record is locked, if no
then lock the record, update and then unlock it. If locked, then wait a
short time and try again, etc. If too many waits ( this has never
happened ) then bail and display a message.

John Bickmore
www.BicycleCam.com
www.Feed-Zone.com

"deko" <dj****@hotmail.com> wrote in message
news:bZ*****************@newssvr29.news.prodigy.co m...
Is there a way to unlock a table so a subroutine can complete?
frmMain!frm0 has got a lock on a table I need to do stuff with.

Error Number 3211: The database engine could not lock table 'tblRecords'
because it is already in use by another person or process.

I've tried this:

HandleErr:
Select Case Err.Number
Case 3211 'could not lock table
Forms!frmMain!frm0.Requery
Resume Next
Case Else
modHandler.LogErr (Me.Form.Name)
Resume Exit_Here
End Select
End Sub

But I get other errors... is there a better way to "unlock" tblRecords?
What does it mean when a table is locked, anyway?

Thanks!

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.