Subject: Code changes ignored (WAS [AccessD] db1, 2, 3 ....)

MartyConnelly martyconnelly at shaw.ca
Fri Jul 9 18:07:36 CDT 2004


You may have the COMPILE ON DEMAND option turned on

What happens is that when COMPILE ON DEMAND is checked, only as
much code as is called gets compiled. This means modules containing
external functions may get partially compiled. When you turn it
off, a call to the external function will compile the entire
module, not just the called function. This means that the compiling
will be in fewer chunks, and that there will be less chance of
fragmentation of the compiled code and less chance of something
going wrong in managing that fragmentation.
It means slower compiles if you turn off.
You can force the code to compile by choosing Compile from the Debug menu
(code window). You can allow Access to automatically compile your code as
needed with Tools | Options | General | Compile On Demand. This is helpful
in identifying problems in your code, such as a For statement that does not
have a matching Next.

You can discover whether the project is currently saved in a compiled state
by entering this into the Immediate Window (Ctrl+G):
    ? IsCompiled()

You should also try decompiling the front end, then compacting it,
then compiling it. It is not at all uncommon to find that this
process will reveal invalid code that a compile before the
decompile did not reveal. That is, there is corrupt or invalid or
uncompilable code in your app that was not showing up until you
discarded all the compiled code and started over from scratch. For
information about why this happens see:

  http://trigeminal.com/usenet/usenet004.asp?1033

Hale, Jim wrote:

>2000. It happens after maybe 20+ changes but is impossible to predict.
>Jim Hale
>
>-----Original Message-----
>From: Charlotte Foust [mailto:cfoust at infostatsystems.com]
>Sent: Friday, July 09, 2004 12:16 PM
>To: Access Developers discussion and problem solving
>Subject: RE: Subject: Code changes ignored (WAS [AccessD] db1, 2, 3
>....)
>
>
>No, I haven't, not in any version of Access.  What version or versions
>are you dealing with?
>
>Charlotte Foust
>
>-----Original Message-----
>From: Hale, Jim [mailto:Jim.Hale at fleetpride.com] 
>Sent: Friday, July 09, 2004 8:16 AM
>To: 'Access Developers discussion and problem solving'
>Subject: RE: Subject: RE: [AccessD] db1, 2, 3 ........
>
>
>Slightly different question- have you run into cases where after "x"
>number of changes to code Access just decides not to run them, ie it
>just executes the old code and completely ignores the new? It is
>extremely annoying. The only cure I've found is to import everything
>into a new database container. Jim Hale
>
>-----Original Message-----
>From: Charlotte Foust [mailto:cfoust at infostatsystems.com]
>Sent: Friday, July 09, 2004 10:16 AM
>To: Access Developers discussion and problem solving
>Subject: RE: Subject: RE: [AccessD] db1, 2, 3 ........
>
>
>The db1.mdb, etc., files are compacted copies of the database that
>couldn't be renamed, perhaps because the original couldn't be deleted
>for some reason.  If you're spawning those, then you probably aren't
>actually compacting your database even though you may think you are.  If
>the database is in a partially compiled state (this is a VBA project
>issue, not compact and repair), then that might be what is causing the
>problem.  Try turning off the autocompact and then using the decompile
>switch to open the database and use the bypass key to avoid running any
>code. Then close the database, reopen without the decompile switch but
>using the bypass, and compile and save the VBA project.  Then try
>turning compact on exit back on and see if that cures the problem.
>
>Charlotte Foust
>
>-----Original Message-----
>From: pedro at plex.nl [mailto:pedro at plex.nl] 
>Sent: Friday, July 09, 2004 1:21 AM
>To: AccessD at databaseadvisors.com
>Subject: Subject: RE: [AccessD] db1, 2, 3 ........
>
>
>Hello Charlotte,
>
>i indeed have turned on Compile (compact and repair) after Exit, and
>indeed its a permissions protected database. 
>So i can delete these db1.mdb etc without any troubles??
>
>Another question: Is compiling after exit a good option, because the
>fact that in this way the database several times a day wil be compacted.
>
>Pedro Janssen
>
>
>
> 
>
>From: "Charlotte Foust" <cfoust at infostatsystems.com>
>To: "Access Developers discussion and problem solving"
>Date: Thu, 8 Jul 2004 14:01:58 -0700
>Subject: RE: [AccessD] db1, 2, 3 ........
>
>Do you have Compile on Exit turned on?  I've usually seen that kind of
>thing when the database attempted to compact but for some reason (often
>permissions), it couldn't delete the original and rename the db1.mdb,
>etc.
>
>Charlotte Foust
>
>-----Original Message-----
>From: Pedro Janssen [mailto:pedro at plex.nl] 
>Sent: Thursday, July 08, 2004 12:56 PM
>To: AccessD at databaseadvisors.com
>Subject: [AccessD] db1, 2, 3 ........
>
>
>Hello Group,
>
>i have an front & backend mdb on a server. The front-end creates
>temporary?? databases named as db1.mdb, db2.mdb, db3.mdb etc. each with
>different filesize.
>
>Why is this and why are these not deleted automatically?
>
>TIA
>
>Pedro Janssen
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada






More information about the AccessD mailing list