found a good way to do this with .DTS files. script needs to be in the same
directory as the DTS files.
Dim Path:
Path=Left(WScript.ScriptFullName,Len(WScript.Scrip tFullName)-Len(WScript.ScriptName)-1)
'names of package files
Dim Sources: Sources = Array("XXX.dts","YYY.dts")
Dim i
For i = 0 To Ubound(Sources)
'Msgbox Path & "\" & Sources(i)
Import Path & "\" & Sources(i)
Next
Sub Import(FilePath)
Dim P: Set P = CreateObject("DTS.Package")
With P
.LoadFromStorageFile FilePath, ""
'for local database, using trusted connection
.SaveToSQLServer "(local)", , ,256
End With
Set P = Nothing
End Sub
"Craig Buchanan" <someone (AT) somewhere (DOT) com> wrote
Quote:
I would like to import a DTS package that has been saved as a BAS module
into MSDE from within a VBA script. Is this possible?
Thanks for your time.
Craig Buchanan |