Dior-

You can do it if the target database is not the database where the code is
running.  You can make a separate "data only" mdb file and use linked tables
to your code to get at the data.  Use DBEngine.CompactDatabase to compact
the separate data file - but you must not have any tables or queries open
the database when you do that.  Note that you must compact into a different
name.  If the compact runs OK, use Kill to delete the old file and Name to
rename the new compacted version back to the old name.

John Viescas, author
"Building Microsoft Access Applications"
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Diory Paulus Damanik
Sent: Thursday, December 15, 2005 3:25 AM
To: [email protected]
Subject: [ms_access] Automate compact

Greetings...

 

Is there another way (script or..?) to compact database in Microsoft
Access beside using Tools-->Database Utilities-->Compact and Repair
Database..?

 

I had a main macro which contains:

- Query1: Import text data  to TableData_temporary

- Query2: Do select query and process some field from table
TableData_temp and put the result into TableData_permanent

- Query3 or child macro to run automate compact (is this possible? Since
I don't need TableData_temporary anymore I need to delete all the
records from it and automatically compacted to avoid large filesize)

- Query4: Do data processing for TableData_permanent

 

I really need this automate compact because the data was so huge.

I have had experience that my Access stopped its process with 2GigaByte
data.

Please kindly help me.

 

Thanks & Regards,

Dior



[Non-text portions of this message have been removed]




 
Yahoo! Groups Links



 






------------------------ Yahoo! Groups Sponsor --------------------~--> 
1.2 million kids a year are victims of human trafficking. Stop slavery.
http://us.click.yahoo.com/WpTY2A/izNLAA/yQLSAA/q7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to