473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Changed MaxLocksPerFile in register - no result

Hi all,
I am trying to search a table of emailaddresses records (tblMails -
slightly more then 7000)for
the occurance of words which are stored in another table (tblFilterwords-
aprox 3000 records) using DAO.
The program works as follows:
First I define a recordset called rstMails
Then I make a loop in VBA while looking for the occurence of "<" in the
field emailaddress. Using this I am able to extract the "pure" emailaddress,
without any names or other information. The remainder of the information is
being written to another field.
After this has been done (about 7000 times) I make another loop and start
looking for the occurance of the filterwords which are stored in the second
table (about 3000 records). So each emailaddress has to be compared with
evey value in the second table. So the total number of comparisions is 7000
x 3000 = about 21,000,000.
This all worked fine when the first table had only about 6000 records. When
adding another 1200 records to the first table, all of the sudden Access
gave me the following warning (translated in English 'cause I have the Dutch
version): "The number of locks for shared file using has been exceeded.
Increase MaxLocksPerFile in register.

So, that's what I did, I increased the value from the default (9500) to
200000. No result at all, it keeps on giving me the same message. I don't
really understand what this MaxLocksPerFile is.
Can anybody please help me with this problem?

Thanks in advance

Apr 17 '06 #1
5 4697
"Ronny Sigo" <roon ad skynet.be> wrote in
news:44***********************@news.skynet.be:
Hi all,
I am trying to search a table of emailaddresses records (tblMails -
slightly more then 7000)for
the occurance of words which are stored in another table
(tblFilterwords- aprox 3000 records) using DAO.
The program works as follows:
First I define a recordset called rstMails
Then I make a loop in VBA while looking for the occurence of "<" in
the field emailaddress. Using this I am able to extract the "pure"
emailaddress, without any names or other information. The remainder of
the information is being written to another field.
After this has been done (about 7000 times) I make another loop and
start looking for the occurance of the filterwords which are stored in
the second table (about 3000 records). So each emailaddress has to be
compared with evey value in the second table. So the total number of
comparisions is 7000 x 3000 = about 21,000,000.
This all worked fine when the first table had only about 6000 records.
When adding another 1200 records to the first table, all of the sudden
Access gave me the following warning (translated in English 'cause I
have the Dutch version): "The number of locks for shared file using
has been exceeded. Increase MaxLocksPerFile in register.

So, that's what I did, I increased the value from the default (9500)
to 200000. No result at all, it keeps on giving me the same message. I
don't really understand what this MaxLocksPerFile is.
Can anybody please help me with this problem?

Thanks in advance


When we meet the limits of Access or the OS, it is usually because we
have chosen to try to implement an inefficient solution.
If you tell us the version of Access you are using someone may post a
suggestion for a cost-effective (in terms of resources) alternate way of
resolving the difficulty.
Very frequently, there is a better way than looping through recordsets.

--
Lyle Fairfield
Apr 17 '06 #2
Try doing this in a query rather than VBA code using the InStr function
to locate the "<" and Left or Right function to get the remainder.

Alternatively, you can create a custom function that is passed the
field value as a parameter and let it parse out the part you want as
the return value.

That way you can get what you need without opening a recordset and you
will avoid the MaxLocks problem.

For more information, read my paper on Query Tips and Techniques with
the section on using Custom Functions:
http://www.fmsinc.com/tpapers/queries/index.html#custom

Luke Chung
President
FMS, Inc.
http://www.fmsinc.com

P.S. Visit our web site for a FREE preview of Total Access Emailer
2003, version 11.5! Send personalized emails to your contacts. You can
now embed Access tables, queries, and reports in your email messages.
Use the Access report generator as your HTML email creator.

Apr 17 '06 #3
I will have to go back and check some old mdb files that I had. But I
had a similar problem, and the solution to the problem of the # not be
reset was that I had to issue the command in the db to reset the
number. However the solutions that would cut down on the acquisitions
would be the best.

Apr 17 '06 #4
Hi,
Thanks for responding :) My version of Access is Access 2003

Greetz ...

"Ronny Sigo" <roon ad skynet.be> schreef in bericht
news:44***********************@news.skynet.be...
Hi all,
I am trying to search a table of emailaddresses records (tblMails -
slightly more then 7000)for
the occurance of words which are stored in another table (tblFilterwords-
aprox 3000 records) using DAO.
The program works as follows:
First I define a recordset called rstMails
Then I make a loop in VBA while looking for the occurence of "<" in the
field emailaddress. Using this I am able to extract the "pure"
emailaddress, without any names or other information. The remainder of the
information is being written to another field.
After this has been done (about 7000 times) I make another loop and start
looking for the occurance of the filterwords which are stored in the
second table (about 3000 records). So each emailaddress has to be compared
with evey value in the second table. So the total number of comparisions
is 7000 x 3000 = about 21,000,000.
This all worked fine when the first table had only about 6000 records.
When adding another 1200 records to the first table, all of the sudden
Access gave me the following warning (translated in English 'cause I have
the Dutch version): "The number of locks for shared file using has been
exceeded. Increase MaxLocksPerFile in register.

So, that's what I did, I increased the value from the default (9500) to
200000. No result at all, it keeps on giving me the same message. I don't
really understand what this MaxLocksPerFile is.
Can anybody please help me with this problem?

Thanks in advance

Apr 18 '06 #5
Here is the microsoft knowledge base reference:
http://support.microsoft.com/kb/161329/en-us
Method 2: Using SetOption to Change MaxLocksPerFile Temporarily
The SetOption method temporarily overrides values for the Microsoft Jet
database engine keys in the Windows Registry. The new value remains in
effect until you change it again, or until the DBEngine object is
closed.

NOTE: Changes made to the MaxLocksPerFile setting using the SetOption
method will only be available through the current session of DAO (Data
Access Objects). Queries run through the Microsoft Access user
interface, will still use the settings within the registry.

The article has an example.

I believe this is what I did, and the problem was resolved.

Hope this helps.

Ron

Apr 18 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Trevor Fairchild | last post by:
I'm working with an ado recordset in VB6 - connecting to a database and updating every record for a new index number based on a filter set ordered by the user. I get the "File Sharing Lock Count...
1
by: rdavis7408 | last post by:
I have a database that has a form that opens a report using date parameters. I have been using it for six months and last week I began to get the following Error Message: "File sharing lock...
1
by: Earl Anderson | last post by:
My brother is in the process of purchasing a neighborhood dry cleaners store. Having seen some of the process applications I've written in MS Access, he asked me if I could develop an application...
14
by: aruna | last post by:
What is the disadvantage of using register storage class specifier?
64
by: Morgan Cheng | last post by:
Hi All, I was taught that argument valuse is not supposed to be changed in function body. Say, below code is not good. void foo1(int x) { x ++; printf("x+1 = %d\n", x); } It should be...
29
by: orium69 | last post by:
hi everyone, i'm wondering if there is a way to have sure that a variable is allocated in the cache, after its declaration with "register"? Tks!
0
by: surotkin | last post by:
Hi all! My code is causing a violation against the MaxLocksPerFile in the registry. I checked Microsoft Knowledge Base http://support.microsoft.com/default.aspx?scid=kb;EN-US;815281. It...
33
by: Snis Pilbor | last post by:
With the "as if" rule in play, doesn't that effectively render the "register" keyword completely useless? Example: I make a silly compiler which creates code that goes out of its way to take a...
13
by: dafinder | last post by:
I am running the table analyzer in access 2003. I have edited the maxlocksperfile entry to 300,000 and when i try and analyze the table i get a Not enough space on temporary disk error. I have a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.