• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2677
  • Last Modified:

Accecss 2010 - laccdb BE lock file

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
MonkeyPie
Asked:
MonkeyPie
  • 3
  • 3
1 Solution
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
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
 
MonkeyPieAuthor Commented:
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
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
MonkeyPieAuthor Commented:
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
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
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
 
MonkeyPieAuthor Commented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now