dbTalk Databases Forums  

Access a DAO object from ActiveX script

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


Discuss Access a DAO object from ActiveX script in the microsoft.public.sqlserver.dts forum.



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

Default Access a DAO object from ActiveX script - 11-10-2003 , 01:09 PM






Hello, I would like to call the DAO
DBEngine.compactdatabase method to compact an Access
database before I populate it with new data.

I need to run this as part of an ActiveX task in a DTS
package. Can someone show me a VBscript code sample to
accomplish this?

Many thanks!

Ric

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Access a DAO object from ActiveX script - 11-10-2003 , 01:52 PM






What about using JET. Call the CompactDatabase method. It will want to
create a new DB i.e. not in place. Do this. Delete the old and rename the
new.

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


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

Quote:
Hello, I would like to call the DAO
DBEngine.compactdatabase method to compact an Access
database before I populate it with new data.

I need to run this as part of an ActiveX task in a DTS
package. Can someone show me a VBscript code sample to
accomplish this?

Many thanks!

Ric



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.