473,508 Members | 2,357 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access 2007 saves a new file upon exiting...

5 New Member
Hello,

I have a 2007 access database named sales.accdb. If I open it, then immediately close it, my folder will have the following:

- sales.accdb
- sales1.accdb

If I open sales.accdb again, and immediately close it, I will have in my folder:

- sales.accdb
- sales1.accdb
- sales2.accdb

If I open sales1.accdb and immediately close it, I will have in my folder:

- sales.accdb
- sales1.accdb
- sales2.accdb
- sales11.accdb

Why is it doing this and how can I get it to stop? It is really annoying me. Any help would be greately appreciated!
Jul 6 '07 #1
9 4102
MMcCarthy
14,534 Recognized Expert Moderator MVP
Adam

I haven't used Access 2007 yet but I would guess that this is being caused by a compact and repair on closing. Check under options if the compact on close option is ticked.

Mary
Jul 7 '07 #2
MMcCarthy
14,534 Recognized Expert Moderator MVP
Also the fact that a new file is being created indicates that the ldb file is not closing. Look for a file called sales.ldb when the database is closed. If it is there then delete it. It should only be there when the database is open. Hopefully microsoft haven't changed the extension for this as well.
Jul 7 '07 #3
Adamowski
5 New Member
Oddly enough, if I open the file on a different machine, I do not have this problem. I checked the options and the database is not being compacted upon close.

In addition, the temporary file you mentioned in 2007 has an extension *.laccdb.

Any other ideas? Thanks!
Jul 8 '07 #4
MMcCarthy
14,534 Recognized Expert Moderator MVP
Oddly enough, if I open the file on a different machine, I do not have this problem. I checked the options and the database is not being compacted upon close.

In addition, the temporary file you mentioned in 2007 has an extension *.laccdb.

Any other ideas? Thanks!
Does sales.laccdb disappear when you close the database.

If it is only happening on the one machine I honestly don't think the problem is with the database.
Jul 8 '07 #5
jtam
2 New Member
In a test that I ran when compact on close was enabled everytime I closed the database that was on a mapped network drive it created the extra database numbered as you described. I verified I had all the correct permisions in the folder that the database resides.

I then copied the database to my local drive and the problem of creating the duplicate database whent away. I repoend the one on the network drive and again the problem occured.

Also it appeared that the new duplicate copy that it created was compacted but the original was not.

When I disabled compact on close it stopped.
Jul 11 '07 #6
jtam
2 New Member
In a test that I ran when compact on close was enabled everytime I closed the database that was on a mapped network drive it created the extra database numbered as you described. I verified I had all the correct permisions in the folder that the database resides.

I then copied the database to my local drive and the problem of creating the duplicate database whent away. I repoend the one on the network drive and again the problem occured.

Also it appeared that the new duplicate copy that it created was compacted but the original was not.

When I disabled compact on close it stopped.
I just did another test and when it is on the network drive it does not appear to delete the lock file in time and that is why it cannot overwrite the original database when the compact is done, thus creates another. When on the local drive the lock file deletes very quickly and thus it can overwright the original when the compact is complete.

Does anyone have a suggestion on how to set it where it waites a specified delay before compacting on exit, possibley giving time for it to clear the lock file.
Jul 11 '07 #7
MMcCarthy
14,534 Recognized Expert Moderator MVP
I just did another test and when it is on the network drive it does not appear to delete the lock file in time and that is why it cannot overwrite the original database when the compact is done, thus creates another. When on the local drive the lock file deletes very quickly and thus it can overwright the original when the compact is complete.

Does anyone have a suggestion on how to set it where it waites a specified delay before compacting on exit, possibley giving time for it to clear the lock file.
I'm not aware of a solution to this problem. Any solution I can think of will have the same problem with the lock file not being deleted quickly enough. I'm sure there is code out there though. I'll see what the other experts think.
Jul 11 '07 #8
puppydogbuddy
1,923 Recognized Expert Top Contributor
Hi Mary,
It would be better to do a Jet Compact instead of an Access compact because a Jet Compact does not open or close any tables like an an access compact

Here is a function to do a Jet Compact from the tips page of www.aadconsulting.com

Compact a Database Using Jet
Expand|Select|Wrap|Line Numbers
  1. Function CompactDb(strSourceDB As String, strDestDB As String)
  2.  
  3. Dim jetEngine As JRO.JetEngine
  4. Dim strSourceConnect As String
  5. Dim strDestConnect As String
  6.  
  7.  
  8. ' Build connection strings for SourceConnection
  9. ' and DestConnection arguments
  10. strSourceConnect = "Data Source=" & strSourceDB
  11. strDestConnect = "Data Source=" & strDestDB
  12.  
  13. Set jetEngine = New JRO.JetEngine
  14.  
  15. jetEngine.CompactDatabase strSourceConnect, strDestConnect
  16.  
  17. Set jetEngine = Nothing
  18.  
  19. End Function
  20.  
Jul 11 '07 #9
Louverril
3 New Member
Sp1 fixes this

Lou
Mar 12 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

37
5180
by: jasmith | last post by:
How will Access fair in a year? Two years? .... The new version of Access seems to service non programmers as a wizard interface to quickly create databases via a fancy wizard. Furthermore, why...
17
7646
by: Neil | last post by:
A client of mine likes some of the new bells and whistles in Access 2007, and is thinking about converting our A03 format MDB to an A07 format file. However, while some of the users have A07, many...
2
1238
by: Darknight850 | last post by:
Hello All, I have ran into a foolish problem using access 2007. I have made a database using 2003 with user-level security and for some reason when I start the database now that I have installed...
0
1442
by: Ducknut | last post by:
Hi all, Thanks in advance, I have form in an access db (Access 2000) that users can use to (hopefully) import a raw .txt file into access. The user clicks a button and a FileDialog opens to select...
0
3729
by: ppardi | last post by:
I'm developing an addin for Word 2007 and I need to determine whether a user saves a Word 2007 document in an older format (97-2003) after a save as is done. The scenario is that the user starts...
2
4754
by: Terry Chapman | last post by:
I have a 2003 Access .mda add-in which I can sign using my Thawte digital certificate. I am now migrating this add-in to Access 2007 and when I try to add my Thawte digital signature Access 2007...
9
4474
by: prakashwadhwani | last post by:
Hi !! I'm about to develop a new project for a client. Should I go about it in Access 2003 or 2007 ? Purchasing it either for me or for my client is not a major consideration here ... what I'd...
2
1954
by: Access | last post by:
Anyone else experiencing corruption problems using Access 2003 to edit .adp files? I've been experiencing corruption problems with a particular database. I've tried copying all the objects into a...
0
2817
by: ARC | last post by:
Hello all, Due to some users experiencing severe front end bloating (Normal compacted front end .accdr is 27MB's, FE can bloat to 80-90+Mb's in a day), I want to enable the "Compact on Close"...
0
7120
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5050
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.