Solved

Accecss 2010 - laccdb BE lock file

Posted on 2013-11-03
6
2,469 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now