Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Could Not Lock File Error 3050, Error handler not catching, VB6

113 views
Skip to first unread message

Anita

unread,
Feb 22, 2011, 11:40:47 AM2/22/11
to
I'm suddenly receiving a 'Could not lock file Error 3050' from a client app
using a MSAccess backend.

I have a thorough error handler/logging in this and other modules, and it
does/did catch all other errors.
There is no human user on this app, it just reads a table every 15 seconds.

Where might the 3050 be coming from, if not the only active module?


Anita

unread,
Feb 22, 2011, 12:06:59 PM2/22/11
to

"Anita" <no_...@mail.com> wrote in message
news:jGR8p.19203$4Y6....@newsfe06.iad...
Facinating, when I removed the:
RSud.Close
Set RSud = Nothing
DBud.Close
Set DBud = Nothing

No more 3050.


Anita

unread,
Feb 22, 2011, 12:31:50 PM2/22/11
to

"Anita" <no_...@mail.com> wrote in message
news:U2S8p.35291$Bv7....@newsfe12.iad...
Correction

Without the closes they are less frequent.


ralph

unread,
Feb 22, 2011, 1:33:36 PM2/22/11
to

The following mentions Novell networks, but the issue is the same
whenever or wherever:
http://support.microsoft.com/kb/305995
http://support.microsoft.com/kb/815281

One of the few errors that means exactly what it says. <g>
Jet is running out of locks. (The .Close difference is likely because
Jet is able to reuse the same lock.)

You can try boosting the number with the Registry hack provided, or
better ...

Based on the modest requirements you suggested before for your
over-all problem domain - why do you have so many locks? Impossible to
provide any constructive help without seeing your code - but I bet you
don't need that many.

-ralph

Anita

unread,
Feb 22, 2011, 4:17:26 PM2/22/11
to

"ralph" <nt_cons...@yahoo.net> wrote in message
news:etu7m65pbgbunar27...@4ax.com...
Yes
Glad you mentioned that. I had found this article
http://support.microsoft.com/kb/815281 just after this post, and added the
line:
DAO.DBEngine.SetOption dbMaxLocksPerFile, 15000
to change it from 9500 to 15000 (in my troublesome module that rapidly opens
& closes the DB).

Its seems to have helped. At the moment the X.Close and Set ..= Nothing
commands are commented, no crashes in over almost 4 hours.
Tested with 3 simultaneous clients operating for 1/2 hour with no probs.

I have the DB & RS Close and Set DB & RS on the Form_Close. I'll test it
later in the troubled module.


ralph

unread,
Feb 22, 2011, 4:47:51 PM2/22/11
to
On Tue, 22 Feb 2011 15:17:26 -0600, "Anita" <no_...@mail.com> wrote:


>>
>> Based on the modest requirements you suggested before for your
>> over-all problem domain - why do you have so many locks? Impossible to
>> provide any constructive help without seeing your code - but I bet you
>> don't need that many.
>>
>> -ralph
>>
>Yes
>Glad you mentioned that. I had found this article
>http://support.microsoft.com/kb/815281 just after this post, and added the
>line:
> DAO.DBEngine.SetOption dbMaxLocksPerFile, 15000
>to change it from 9500 to 15000 (in my troublesome module that rapidly opens
>& closes the DB).
>
>Its seems to have helped. At the moment the X.Close and Set ..= Nothing
>commands are commented, no crashes in over almost 4 hours.
>Tested with 3 simultaneous clients operating for 1/2 hour with no probs.
>
>I have the DB & RS Close and Set DB & RS on the Form_Close. I'll test it
>later in the troubled module.
>

" ... module that rapidly opens & closes the DB"

It is unusual for an application to have to open and close the
DBEngine that much.

-ralph

0 new messages