dbTalk Databases Forums  

Compact an Access database from DTS package

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


Discuss Compact an Access database from DTS package in the microsoft.public.sqlserver.dts forum.



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

Default Compact an Access database from DTS package - 11-03-2003 , 01:21 PM






Hello, I have created a DTS package that inserts and
deletes records in an Access database. I would like to
run the Compact method against the Access database when
the package completes. I imagine this will have to be
done with an ActiveX script task.

Is there anyone who can show me some sample code or
explain how this can be done?

Thanks!

Ric

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Compact an Access database from DTS package - 11-03-2003 , 01:42 PM






In article <052f01c3a23f$a42344c0$a101280a (AT) phx (DOT) gbl>, Ric
<richard.hofing (AT) notes (DOT) canadair.ca> writes
Quote:
Hello, I have created a DTS package that inserts and
deletes records in an Access database. I would like to
run the Compact method against the Access database when
the package completes. I imagine this will have to be
done with an ActiveX script task.

Is there anyone who can show me some sample code or
explain how this can be done?

Thanks!

Ric
You can do this in one of two ways-

Use the DAO CompactDatabase method

Use the Access exe with the "/compact" command line switch.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #3  
Old   
Ric
 
Posts: n/a

Default Re: Compact an Access database from DTS package - 11-03-2003 , 03:02 PM




Darren, can you show me some sample code for the ActiveX task?

Ric



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: Compact an Access database from DTS package - 11-05-2003 , 03:59 PM



In article <#zQpa3koDHA.2820 (AT) TK2MSFTNGP10 (DOT) phx.gbl>, Ric <ric (AT) ric (DOT) com>
writes
Quote:
Darren, can you show me some sample code for the ActiveX task?

Ric

Some options. Search the KB on product Access 2000 and keyword compact-

ACC2000: Jet Compact Utility Available in Download Center
http://support.microsoft.com/default...b;en-us;273956

ACC2000: How to Compact Databases At a Scheduled Time
http://support.microsoft.com/default...b;en-us;209979

ACC2000: How to Use Command-Line Switches in Microsoft Access
http://support.microsoft.com/default...b;en-us;209207
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.