Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 8th, 2008, 11:56 PM
Authorized User
 
Join Date: Mar 2008
Location: , , .
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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?

Reply With Quote
  #2 (permalink)  
Old November 10th, 2008, 12:24 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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
Reply With Quote
  #3 (permalink)  
Old November 10th, 2008, 08:39 PM
Authorized User
 
Join Date: Mar 2008
Location: , , .
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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....

Reply With Quote
  #4 (permalink)  
Old November 22nd, 2008, 01:01 AM
Registered User
 
Join Date: Nov 2008
Location: Bronx, NY, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?

Reply With Quote
  #5 (permalink)  
Old May 16th, 2011, 06:09 AM
Registered User
 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!
Reply With Quote
  #6 (permalink)  
Old May 16th, 2011, 08:23 AM
Authorized User
Points: 346, Level: 6
Points: 346, Level: 6 Points: 346, Level: 6 Points: 346, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2010
Posts: 61
Thanks: 0
Thanked 13 Times in 13 Posts
Default

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.
Reply With Quote
  #7 (permalink)  
Old May 16th, 2011, 05:24 PM
Registered User
 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
Reply With Quote
  #8 (permalink)  
Old May 23rd, 2011, 08:48 AM
Registered User
 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #9 (permalink)  
Old May 23rd, 2011, 12:44 PM
Friend of Wrox
Points: 1,015, Level: 12
Points: 1,015, Level: 12 Points: 1,015, Level: 12 Points: 1,015, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

Like most Access developers, I avoid embedded graphic on forms and reports. Thy cause lots of database bloat and other issues.
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015
Reply With Quote
  #10 (permalink)  
Old May 23rd, 2011, 02:00 PM
Registered User
 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling Simple File Sharing in Windows XP. firblazer BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 April 14th, 2008 01:10 PM
Received sharing violation occur on .php file Snowby Pro PHP 0 April 9th, 2008 09:18 AM
How to lock certain excel file into one pc? kevinace Excel VBA 1 May 16th, 2007 04:50 PM
lock folder or file siva_garlapati Biztalk 2 January 16th, 2006 09:23 AM
error 1222: lock request time out exceeded jpenn SQL Server 2000 1 October 25th, 2004 11:05 PM



All times are GMT -4. The time now is 03:21 PM.


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