Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to call a DAO method from DTS package

Status
Not open for further replies.

rhofing

MIS
Dec 12, 2001
25
CA
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
 
Never done it before . . . but this might help you in the right direction . . .

Dim objObject

1) Set objObject= CreateObject("DBEngine.compactdatabase")
Call objObject.excecute(Any prameters needed)
or . . .
2) Set objObject= CreateObject("DBEngine")
Call objObject.compactdatabase(Any prameters needed)

Set compactdatabase= Nothing

Hope it helps!
[flowerface]

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top