Unwanted automatic backup of db while single stepping code (1 Viewer)

CodeByJim

New member
Local time
Today, 00:35
Joined
Apr 18, 2015
Messages
9
Hello.

I am a single user developing a database for my personal use. I am not using a back end database. Everything in my database is contained in one ACCDB.

A while ago, I was single stepping thru some code, setting bookmarks, after stopping at a breakpoint. I had done no editing! There is no reason for Access to take any action except to wait for the next step request!

Unfortunately Access, without any warning message, decided it was time to make a backup of my database. When this happens, all of my bookmarks and breakpoints, which it took me a half hour to set up, are LOST! This undisciplined behavior is most frustrating!!!

As I use a lot of Modules, I backup frequently! I Decompile and recompile my database regularly, but not every time I run it. I have tried ALL of the standard solutions. I never had a problem like this when I was using Access 2000, 97 or 3.1!!!

I would appreciate a solution to what I consider a bug in the Access program itself!

Thank you.

Jim Stauble
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:35
Joined
Feb 19, 2002
Messages
42,981
I've never encountered or heard of this behavior before. Do you have some automated backup that ran while you were working? If so, you might want to change its schedule. It is important to report incidents like this to MS when they happen. They have now conveniently included a way to do that using File/Feedback.

Even when I develop for myself, I use split databases. It is just so easy that I don't even think about it.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 01:35
Joined
Feb 28, 2001
Messages
27,001
The question is whether you had warnings turned off at the time so didn't catch an error that you should have caught. This behavior is common when the database hits a "crash" condition. I.e. the database died catastrophically while open so it preserved itself for you to (try to) prevent data loss, then re-opened itself.
 

CodeByJim

New member
Local time
Today, 00:35
Joined
Apr 18, 2015
Messages
9
I assume(poor word choice) that warnings are on by default. I have never touched that setting. The program ran error free before the backup and it runs error free after being decompiled, repaired, compacted and re-compiled, with no edits made to the code. Apparently the modules don't compile properly when the "Compile" and "Save" buttons are clicked.

I got this information when I posted to a Microsoft site.

"Fortunately, Microsoft Access offers a way to fix the VBA compiled state with the /decompile command line option. The Compact and Repair feature only applies to the tables and does not impact VBA code. The decompile command does.

When Access is started with this and you open your database, it discards all the old VBA compilations, and leaves just your VBA source code. You'll need to compile again to get the compiled state. After compacting, your database may be significantly smaller."

I find this interesting since the backup that is made is approximately half again as large as the original. I use a lot of modules in my database, but I have never seen anything mentioned about the number of modules or objects that can be used in a database.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:35
Joined
Oct 29, 2018
Messages
21,358
I assume(poor word choice) that warnings are on by default. I have never touched that setting. The program ran error free before the backup and it runs error free after being decompiled, repaired, compacted and re-compiled, with no edits made to the code. Apparently the modules don't compile properly when the "Compile" and "Save" buttons are clicked.

I got this information when I posted to a Microsoft site.

"Fortunately, Microsoft Access offers a way to fix the VBA compiled state with the /decompile command line option. The Compact and Repair feature only applies to the tables and does not impact VBA code. The decompile command does.

When Access is started with this and you open your database, it discards all the old VBA compilations, and leaves just your VBA source code. You'll need to compile again to get the compiled state. After compacting, your database may be significantly smaller."

I find this interesting since the backup that is made is approximately half again as large as the original. I use a lot of modules in my database, but I have never seen anything mentioned about the number of modules or objects that can be used in a database.
Hi.

Total number of objects: 32,768
Total number of modules: 1,000

 

CodeByJim

New member
Local time
Today, 00:35
Joined
Apr 18, 2015
Messages
9
Thanks for your comment Pat. The only time my db gets backed up is when I physically back it up and when I do, it goes to three seperate folders on a different hard drive partition and to three seperate folders on a SD card. Backup are only done after a compile and save.

By the way, I like your line at the bottom of your post! "Bridge Players Still Know All the Tricks".
Catch me on BBO sometime. Username: CodeByJim
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:35
Joined
Feb 19, 2002
Messages
42,981
There are limits to everything in Access. I don't have the link hand so I can't tell you what the limit is for modules.

Set Option Explicit in all code modules if it is not already present and then set the Require Variable Declaration to True so that Access will add the command automatically as each new module is created.

Compile regularly and always fix compile errors immediately.

C&R places the db in an "uncompiled" state so the next time you do anything, Access will automatically recompile. However, as the help entry says, C&R does not remove debris from compiled code.

The Decompile option was and I think still is an undocumented feature. MS built it for the use of their developers but now it is common knowledge and experts use it to try to root out corruption.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:35
Joined
Feb 19, 2002
Messages
42,981
I'm Patsky
I'm on right now. Playing at 1:10 in the open pairs.

I'm thinking of changing the tag to:

"Old Bridge players never die, they just shuffle away" :)
 
Last edited:

Users who are viewing this thread

Top Bottom