MartyConnelly
martyconnelly at shaw.ca
Tue Nov 25 10:26:18 CST 2003
There are some interesting affects leaving compile on demand on that may lead to code corruption 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. Mary Chipman and Michael Kaplan recommend it be turned off. This does make for longer compiles though. see http://www.trigeminal.com/usenet/usenet004.asp?1033 Drew Wutka wrote: >The Compile on Demand is an option that either compiles your code in it's >entirety when your application starts (the option would be off for this..), >or compiles it when it is required (when you have Compile on Demand on). The >big difference is startup speed. If you project has a lot of code, if you >don't use 'Compile on Demand', you are going to get a startup delay as >Access compiles the VBA code. The second option (background compile) is a >subset of compile on demand. If you have compile on demand set, you can use >the background compile option to have Access compile it's code during idle >time periods. > >The reason you have these options, is because VBA is a 'higher' language, >which means it makes sense (or it should...) to a human. But the CPU itself >still requires machine language to be sent to it, so your VBA code must be >compiled into machine language, in order for the CPU to carry out your >instructions. I wonder if you have the Compile on Demand turned off, if you >wouldn't be allowed to make changes to code on the fly, when the application >is running. Hmmmm..... > >Anyhow, I don't see a real reason to not have both options checked. If you >want your code to be compiled all the time, use an .mde. > >Drew > >-----Original Message----- >From: Erwin Craps [mailto:Erwin.Craps at ithelps.be] >Sent: Monday, November 24, 2003 4:56 AM >To: accessd at databaseadvisors.com >Subject: [AccessD] Compile options in VBA. > > > > >Hi > >I was wondering something. >In the VBA editor in options>common(?)>Compile >You can click two options for compiling. >I have the dutch version and I find that the help is poorly explaining >the exact use of these options (if not for everything:-(. >Compile at request and background compiling. > >I wonder if anyone could explain me what those options do and what best >choice is... > > > > >Erwin Craps > >Zaakvoerder > >www.ithelps.be/jonathan > > > >This E-mail is confidential, may be legally privileged, and is for the >intended recipient only. Access, disclosure, copying, distribution, or >reliance on any of it by anyone else is prohibited and may be a criminal >offence. Please delete if obtained in error and E-mail confirmation to >the sender. > >IT Helps - I.T. Help Center *** Box Office Belgium & Luxembourg > >www.ithelps.be <http://www.ithelps.be/> * www.boxoffice.be ><http://www.boxoffice.be/> * www.stadleuven.be ><http://www.stadleuven.be/> > >IT Helps bvba* ** Mercatorpad 3 ** 3000 Leuven > >IT Helps * Phone: +32 16 296 404 * Fax: +32 16 296 405 E-mail: >Info at ithelps.be > >Box Office ** Fax: +32 16 296 406 ** Box Office E-mail: >Staff at boxoffice.be <mailto:figures at boxoffice.be> > > >_______________________________________________ >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com >_______________________________________________ >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com > > > -- Marty Connelly Victoria, B.C. Canada