473,503 Members | 241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to "unlock" table in error handler routine?

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
1 3184
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

134
7747
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that...
7
9131
by: Paul Serby | last post by:
Why does '*select count(id) from "tblContacts"'* do a sequential scan when the field '*id*' is indexed using a btree? MySql simply looks at the index which is keeping a handy record of the...
10
5855
by: Flip | last post by:
I know the int.Parse("123") will result in an int of 123, but what happens with a null? I believe it give a null exception (seems like I get either NullArgumentException or ArgumentNullException...
1
2843
by: Robert Halford | last post by:
On 4th May at 7.45 in the evening my asp.net web sites stopped working on my development server. The page that appears says: Server Application Unavailable The web application you are...
5
14412
by: Glen Buell | last post by:
Hi all, I have a major problem with my ASP.NET website and it's SQL Server 2005 Express database, and I'm wondering if anyone could help me out with it. This site is on a webhost...
17
3890
by: teddysnips | last post by:
One of my clients has asked me to make a change to one of their Access applications. The application is a Front End/Back End standard app. I didn't develop it, but looking at it tells me that...
3
1128
by: sherifffruitfly | last post by:
Hi all, I'm fine with getting the grid to *display* data - it's everything else that I'm sketchy on. In particular, "everything one expects" refers to: (1) When a row in the datagrid is...
3
5524
by: NaeiKinDus | last post by:
Hello, i'm trying to program a thread that would be locked (by a mutex) and that would only be unlocked once that a function (generating data) is done. The purpose is to generate data, and unlock...
3
5848
by: aydeejay | last post by:
I'm trying to troubleshoot an issue where users are not able to bind with LDAP via "GetObject" through our ASP Classic Intranet if they stay logged in overnight (beyond their allowed login hours). ...
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7089
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7463
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5581
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1515
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
738
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
389
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.