Solved

Accecss 2010 - laccdb BE lock file

Posted on 2013-11-03
6
2,515 Views
Last Modified: 2013-11-03
I have 2 different projects for different clients.  Bot are access 2010 databases with split FE and BE.  
For the first client I added a 'compact and repair' button to the FE that would compact the BE if all other user are off.  It works really well.  The FE has an unbound form for various admin functions and this is where the C&R button sits.  I have observed that the BE laccdb file appears only when the user has a bound form open, and disappears whenever they are on an unbound form (main menu, help screen, report menu etc).  So, this is why they are able to C&R BE successfully - the BE is NOT locked.

I added same functionality to the second client, but the BE laccdb file behaved differently.  Backend lock file does not get created until you move from unbound HOME screen to a bound form, but then, when you move off bound form, to unbound form the laccdb file does not disappear.

Both FE databases and both BE databases have the same client settings for record locking:
default: NO LOCKS is ticked, and 'open dbs using record-level locking' is ticked.

Why does the BE laccdb hang around when I move off a bound form in my second situation?  How can I get a C&R function working?

Thank you.
0
Comment
Question by:MonkeyPie
  • 3
  • 3
6 Comments
 
LVL 21
ID: 39620603
Why does the BE laccdb hang around when I move off a bound form in my second situation?

Usually when you "move off"  a bound it loses the focus but is still open. You need to close the form not just move off it.

Is all bound forms are closed then you should be able to compact the back end.

TIP/Alert/Warning:Be sure to make a back up of the database first before the compact  or compact to a new database. I have seen compacting corrupt a database beyond repair.
0
 

Author Comment

by:MonkeyPie
ID: 39620648
I am using the new 2010 navigation type forms for both front ends.  So, when I say 'move off' I mean tab to another form - the bound form does CLOSE in this situation.

My compact function takes a backup before compacting.  Thank you for tip.
0
 
LVL 21
ID: 39620666
I am using the new 2010 navigation type forms for both front ends.  So, when I say 'move off' I mean tab to another form - the bound form does CLOSE in this situation.
Ah .. the navigation form. I have not tried to use they in production yet. I have found to many bug with them while testing.

If the locking database file is still present then you have an open connection to the back end still somewhere in the front end.

In my start up code I open a connection to the back end(s) and keep it open the entire time the front end is opened. The a persistent connection helps with performance. I have to close this connection before I can compact the back end.   Are you doing something similar?
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:MonkeyPie
ID: 39620676
I don't think so.  Both front ends are linked to their respective backends.

Would it be a open recordset somewhere that I haven't closed by mistake?

How do you 'open a connection to BE and keep it open'?
0
 
LVL 21

Accepted Solution

by:
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 500 total points
ID: 39620745
Would it be a open recordset somewhere that I haven't closed by mistake?
Yes, that could do it.

As a test. Open the database and  try to compact the back end before doing anything. Does that work?

In my apps I close all open forms, etc.  before attempting to compact the back end.  You may need to close the navigation form before running the compact.


How do you 'open a connection to BE and keep it open'?

see:
 http://www.fmsinc.com/MicrosoftAccess/Performance/LinkedDatabase.html
Always Keep a Connection Open to the Back End Database While Your Application Runs
You can significantly improve the performance of your Access database by maintaining an open connection to the back-end database throughout the time your front-end database is opened.

By forcing Access to keep the linked table's database open, Access avoids creating a new lock on the backend database every time one of its tables is used. This lets you open tables, forms, and reports much faster. Over a network, you'll usually see a substantial improvement with how quickly a form opens when it's based on a linked table.

0
 

Author Closing Comment

by:MonkeyPie
ID: 39620764
I think it must be an openrecordset that I haven't closed properly.  I pain to find.
Thanks for link to article about keeping conection to BE open.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question