p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access (http://p2p.wrox.com/forumdisplay.php?f=18)
-   -   File Sharing lock count exceeded (http://p2p.wrox.com/showthread.php?t=71375)

williamlove November 8th, 2008 11:56 PM

File Sharing lock count exceeded
 
Occasionally after editing multiple forms I hit save and after a long wait the save fails and I get a nasty message about File Sharing lock count exceeded. When this happens some or all of my forms and tables dissappear until I close Access and reopen it (and one horrible time my database was ruined but I had backup that was only a days work behind).

The message says to increase the file locks, in the registry I believe.

Is this a common problem with a simple fix?


mmcdonal November 10th, 2008 12:24 PM

This is not a common problem with Access. It sounds like you have LOTS of forms open at one time. Generally you want to have one or two maximum forms open at the same time.

Go to Tools > Options > Advanced and make sure Record Locking is set to No Locks, which is the Access default. Then close Access and open it use Start > All Programs > ... > Access, otherwise the change won't take effect.

Is this a multi-user application?


mmcdonal

Look it up at: http://wrox.books24x7.com

williamlove November 10th, 2008 08:39 PM

Someone told me that if I'm creating recordsets in VBA and then not closing them and setting them to nothing this might be the cause.

The same person pointed me to this http://support.microsoft.com/kb/815281

Its just a puzzling issue that has cause me to lose work. I followed the advice but its still strange....


AVPimbleSr November 22nd, 2008 01:01 AM

You did say FILE locks and not RECORD locks, right? File locking has more to do with your file system. If you are working with linked tables, especially on a network, you are working with a connection for each table that is linked. These connections are open when you open the database, not just when you access the linked table.

You might want to consider not using linked tables and either use disconnected recordsets, or use ADO to connect to your data, and close your connection as soon as it is no longer needed.



Allan

Quote:

quote:Originally posted by williamlove
 Occasionally after editing multiple forms I hit save and after a long wait the save fails and I get a nasty message about File Sharing lock count exceeded. When this happens some or all of my forms and tables dissappear until I close Access and reopen it (and one horrible time my database was ruined but I had backup that was only a days work behind).

The message says to increase the file locks, in the registry I believe.

Is this a common problem with a simple fix?



Mikejkemp May 16th, 2011 05:09 AM

File Sharing Lock Exceeded
 
Hi folks,
I am not sure that replying to this note will re-activate interest in this Access error message, but someone may be able to point me in a suitable direction - I hope!
I have just triggered the above mentioned error message by simply selecting an existing, working, report in a database and using File, Save As/Export... to create another, similarly named, report in the same database. Using the File, Copy and Paste, triggers the same error also.
From then on even attempting to close the database, using an 'Exit' routine that 'cleans up' before exiting produces the same message. The only way out is to get to Task Manager and close Access from there.
Has anyone else had this and found a solution - I'm still looking!

malcolmdixon May 16th, 2011 07:23 AM

Hi,

Have you tried the solution at http://support.microsoft.com/kb/815281, which is mentioned below? It's the only thing I know of.

Mikejkemp May 16th, 2011 04:24 PM

File Sharing Lock Count Exceeded
 
Malcolm,

Many thanks for your response, sadly I am pretty sure that MS's suggestions just don't apply this time.

The report in question is the only one in the reports collection that I cannot copy or 'Save As' - even to another 'external' database. The report is a 'letter' which is populated from a table which is 'filled' by code prior to printing the report - like a mail merge. The report itself has no modules and only one or two text boxes which combine one or two fields to form part of a sentence.

I thought the problem might be that I was trying to change and save the report text while the source table was empty: but no! The only thing I have found so far is a hidden (visible property set to No) text box that was, for a reason that I cannot remember, associated with but remote from a label that was visible and placed behind a picture. I removed the text box and its associated label: I can now save the changes I have made to the report - but I still cannot copy it!

The report is part of an Access 97 application, but 2002 and 2003 versions also suffer from the same error. Access 2007 is the only version I have tried that seems to be immune, although I'm not convinced that it is working correctly.

Mikejkemp May 23rd, 2011 07:48 AM

Hi Folks,

I found the solution to my problem and thought I would share it with you in case it rings any bells for anyone else. Despite the error message being presented it doesn't appear to me to be anything to do with File Sharing, File or Record Locking or anything like that.

The particular report (a mailmerge letter wholly contained within MS Access) included an embedded graphic image that formed the 'Letter Heading'. My problem went away when I changed that graphic (a .jpeg) from embedded to linked!

Of course, we gained other advantages like being able to revise the graphic without rebuilding the report as well as the downside of the report taking a little longer to build at run-time.

There must be a, as yet unfound or undocumented, maximum size for a report in Access versions earlier than 2007.

Hope this might help someone else; it has made me rethink how I attack some report designs from now on.

HiTechCoach May 23rd, 2011 11:44 AM

Like most Access developers, I avoid embedded graphic on forms and reports. Thy cause lots of database bloat and other issues.

Mikejkemp May 23rd, 2011 01:00 PM

Hi 'Coach,

Indeed! But, after inheriting a report that has worked successfully for several years, when one is greeted by such a misleading error message it can be a puzzling experience.


All times are GMT -4. The time now is 11:22 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.