?
Solved

Accecss 2010 - laccdb BE lock file

Posted on 2013-11-03
6
Medium Priority
?
2,602 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

800 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