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

How to solve MaxLocksPerFile problem without changing registry settings?

P: n/a
Hi all!

My code is causing a violation against the MaxLocksPerFile in the
registry.
I checked Microsoft Knowledge Base
http://support.microsoft.com/default...b;EN-US;815281.
It suggests increasing MaxLocksPerFile setting in registry by using

DAO.DBEngine.SetOption dbmaxlocksperfile, 1500

or manually.

So far I discovered already that the problem is caused by the following
code

dim dbs as database
dim rst as recordset
set dbs = currentdb
set rst = dbs.openrecordset ("A NORMAL SELECT-QUERY")

do until rst.EOF
rst.edit
......
rst.UPDATE
rst.MoveNext
loop

rst.close
dbs.close
I don't mind to use SetOption method.
However, I don't understand what does the above mentioned code locks.
In other words, what code should I use in order not to lock anything?

=> apparently the records remain locked after the edit-statement. I
didn't have this problem when using Access 97. It seems that Access2002
has much more features for client-server structures but I'll have to
learn how to use them. Therefore I would like to know as what type and
what options I have to give to my recordset in order to achieve that
each record is un-locked directly after the rst.UPDATE statement. In
the help-files I didn't find an answer that solved my problem...

I posted this question one month ago, but I did not get an answer.

Any help appreciated.
Thanks.
Surotkin

Jan 25 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.