Increase MaxLocksPerFile

G

Guest

If I open a table and I copy a column that has more than 9500 records and
paste to another column, I receive an error(3052)

So, how can I increase programmaticaly the number of records with the
SetOption method (MaxLocksPerFile)

Thanks
José Perdigão
 
B

Bas Cost Budde

Copy a column? Paste to another column? You aren't using Excel here, are
you?

Why would you copy the values from one field to another, as it is termed
more in database vocabulary? And, if you must, I suggest you use an
update query.
 
G

Guest

I'm in access 2003, this is a manual update. Or if I copy a column from excel
to access and the number of rows is higher than 9.500 comes the same error.

I know there is a method (Set Options) to increase the 9500 rows
(MaxLocksPerFile) but I don't knlow how can i do.

thanks
 
B

Bas Cost Budde

Repeat: don't copy columns.

Create a new query on your table; set its type to Update (the pencil
icon). Doubleclick the target column from the field list in the upper
pane. The column name will be added to the grid below. In the 3rd row,
put the source field name, between square brackets. Now click the
exclamation button to perform the update.

If you don't have the target column yet, create it first in the table
design view.
 
G

Guest

Thanks, but is not what I want.
Below I show the error:

File sharing lock count exceeded. Increase MaxLocksPerFile registry entry.
(Error 3052)
You have exceeded the maximum number of locks allowed on a recordset. This
limit is specified by the MaxLocksPerFile setting in your system registry.
The default value is 9500, and can be changed either by editing the registry
with Regedit.exe or with the SetOption method.

So I would like to change by SetOption because I don't have access
regedit.exe
Thanks
 
G

Guest

Thanks Brendan,
I use the following procedure
DBEngine.SetOption dbMaxLocksPerFile, 65000
and it works well.

But, if I open another access database, the same error comes. So, it means,
if I want eliminate the error of r another database must I apply the same
procedure?
Thanks
 
B

Brendan Reynolds

I am not 100% sure of this, but if I am interpreting the help files
correctly, I believe the answer is yes, you would need to use regedit if you
want the changes to be system-wide.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top