dbTalk Databases Forums  

Compact and repair an Access database using DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Compact and repair an Access database using DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Shawn
 
Posts: n/a

Default Compact and repair an Access database using DTS - 02-18-2004 , 03:50 PM






Is there a way to execute a "Compact and Repair" process
in DTS for an access database. Problem is, I create an
Access database from the DTS process, then I upload it
using FTP.exe, but I noticed that when I compact and
repair the Access database it shrinks down to about half
the size. Does anyone know if it is possible to compact
and repair a database as an DTS process?

Reply With Quote
  #2  
Old   
Russel Loski, MCSD
 
Posts: n/a

Default RE: Compact and repair an Access database using DTS - 02-18-2004 , 05:41 PM






You would need to use the ActiveX script. You would need to initialize a DAO database object and then open the database

The main difficulty you would have in doing this is that you will need to close all of your connections to the Access database to do it

Russ

Reply With Quote
  #3  
Old   
Ross McKay
 
Posts: n/a

Default Re: Compact and repair an Access database using DTS - 02-18-2004 , 06:29 PM



On Wed, 18 Feb 2004 15:41:08 -0800, Russel Loski wrote:

Quote:
You would need to use the ActiveX script. You would need to initialize a
DAO database object and then open the database.
Or JRO. Just create an instance of JRO.JetEngine, and call the method
CompactDatabase giving it the source name and destination name.
Afterwards, you could use the FileSystemObject to move the new,
compacted database over the old database file.

Quote:
The main difficulty you would have in doing this is that you will need
to close all of your connections to the Access database to do it.
--
Ross McKay, WebAware Pty Ltd
"Words can only hurt if you try to read them. Don't play their game" - Zoolander


Reply With Quote
  #4  
Old   
Kevin3NF
 
Posts: n/a

Default Re: Compact and repair an Access database using DTS - 02-18-2004 , 08:39 PM



Microsoft has a utility called JetComp.exe that may have some useful command
line parameters...not really sure.

http://support.microsoft.com/default...56&Product=acc

--
Kevin Hill
President
3NF Consulting

www.3nf-inc.com/NewsGroups.htm

"Shawn" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Is there a way to execute a "Compact and Repair" process
in DTS for an access database. Problem is, I create an
Access database from the DTS process, then I upload it
using FTP.exe, but I noticed that when I compact and
repair the Access database it shrinks down to about half
the size. Does anyone know if it is possible to compact
and repair a database as an DTS process?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.