Advertisement

08.08.2006 at 03:43AM PDT, ID: 21946756
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.0

MaxLocksPerFile

Asked by IThema in VB Database Programming

Tags:

Hi,

We're sometimes getting the infamous "maxlocksperfile" error while executing queries like the following on a Microsoft Access database:
strSQL = "ALTER TABLE [MyTable] ALTER COLUMN [MyColumn] nvarchar(70) NULL"
MyADOConn.Execute strSQL

The exact error is "File sharing lock count exceeded. Increase MaxLocksPerFile registry entry", number -2147467259

We're using ADO as part of MDAC 2.5 and have installed Jet SP 8. "MyTable" has about 100,000 records and the current definition of "MyColumn" is nvarchar(50) NULL. Current MaxLocksPerFile is default (9,500).

I know I can workaround this problem by increasing the MaxLocksPerFile registry setting for the Jet 4.0 driver, but I don't know why it's bothering in the first place. At the point of executing the query, I have already dropped several relations (FK's), dropped PK's, recreated PK's and recreated relations. All on tables with about 100,000 records. Everything goes fine, up to the point where it tries to increase the max field size of some column where it gives this error.

It seems that Access is locking each record, but I wonder why it does that. Is there a way that I can instruct Jet/ADO not to lock each record or lock the entire table in stead, so that only one lock is needed?

Please advice, but note that I already know a workaround. The idea of this question is mere to get answers on why and how Jet/ADO locks a database and wether there are ways to instruct Jet/ADO differently.


Thanks in advance,

Luc DerckxStart Free Trial
 
Keywords: MaxLocksPerFile
 
Loading Advertisement...
 
[+][-]08.08.2006 at 03:45AM PDT, ID: 17270216

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.08.2006 at 07:58AM PDT, ID: 17271893

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.08.2006 at 08:23AM PDT, ID: 17272115

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.08.2006 at 08:34AM PDT, ID: 17272212

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.08.2006 at 04:08PM PDT, ID: 17275459

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.08.2006 at 04:11PM PDT, ID: 17275476

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: VB Database Programming
Tags: maxlocksperfile
Sign Up Now!
Solution Provided By: jkaios
Participating Experts: 2
Solution Grade: B
 
 
[+][-]08.09.2006 at 02:38AM PDT, ID: 17277530

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.09.2006 at 06:14AM PDT, ID: 17278560

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.13.2006 at 02:53PM PDT, ID: 17728001

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]10.16.2006 at 12:09AM PDT, ID: 17736869

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42