Thanks for the code you sent> But as I am new to all
this I would like to know that do I have to <cfset>
the "objectMDB" and "tempmdb".I am failing to
understand your programm please help/.
--- pan <[EMAIL PROTECTED]> wrote:
> 
> From: "monika kon" <[EMAIL PROTECTED]>
> Subject: Automatic repair and compact
> 
> 
> > Hi everyone,
> > Is it possible to compact and repair Access
> databbase
> > every day automatically through Coldfusion
> code.Please
> > help!!
> > Shally..
> 
> Yes.
> Acc97 DAO 3.5
> Acc2k DAO 3.6
> 
> DAO needs to be on the server - there are ADO
> calls, but DAO seems better to me.
> 
> The below script is the safest way I use.
> You should wrap the below in a cftry/cfcatch trap.
> 
> core script: modfy to your needs
>   <cfset daoClass="DAO.DBEngine.36">
> or,
>   <cfset daoClass="DAO.DBEngine.35">
> 
> 
> <CFOBJECT Action="create" name="DBEngine"
> Class="#daoClass#">
> <CFSET dummy=
> DBEngine.CompactDatabase("#objectMDB#","#tempMDB#")>
> <cfset dropConnections =
> CFUSION_DBCONNECTIONS_FLUSH()>
> <cffile action="delete"
>  file="#objectMDB#">
> <cffile action="rename"
>   source="#tempMDB#"
>   destination="#objectMDB#">
> 
> Pan
> 
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to