[dba-SQLServer]Execute a DTS from Access -- Sample Code

Susan Geller sgeller at cce.umn.edu
Wed Aug 20 10:53:55 CDT 2003


Here's the code that executes the DTS:


            Dim objPackage2 As New DTS.Package
            objPackage2.LoadFromSQLServer "MyServerNameHere", , ,
DTSSQLStgFlag_UseTrustedConnection, , , , "MyDTSNameHere"
            objPackage2.FailOnError = True
            objPackage2.Execute
            objPackage2.UnInitialize
            Set objPackage2 = Nothing



-----Original Message-----
From: Martin Reid [mailto:mwp.reid at qub.ac.uk] 
Sent: Wednesday, August 20, 2003 10:43 AM
To: Susan Geller
Subject: Re: DTS


Both would save me a bucket of time.

Many Thanks

Martin


----- Original Message ----- 
From: "Susan Geller" <sgeller at cce.umn.edu>
To: "Martin Reid" <mwp.reid at qub.ac.uk>
Sent: Wednesday, August 20, 2003 3:58 PM
Subject: RE: DTS


Do you want the code I am using in Access that executes the DTS or do
you want the DTS?

--Susan


-----Original Message-----
From: Martin Reid [mailto:mwp.reid at qub.ac.uk] 
Sent: Wednesday, August 20, 2003 9:37 AM
To: Susan Geller
Subject: DTS


Susan

Could I see your DTS script. I am about to do something very similar?

Martin



More information about the dba-SQLServer mailing list