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

Mark L. Breen subs at solution-providers.ie
Thu Aug 21 05:19:27 CDT 2003


Hello Susan,

Have you executed script in DTS packages?

I am aware since the first time I saw them that you can run some kind of VB
script but I have never done it.

I know that Martin was seeking the VB code to execute the package, but do
you have script?  I would love to see some just to get the basic syntax

Martin, I am using DTS to import about 100 files per week and I find it
reliable, just to let you know.

Thanks Susan,

Mark


----- Original Message ----- 
From: "Susan Geller" <sgeller at cce.umn.edu>
To: <dba-SQLServer at databaseadvisors.com>
Cc: "Martin Reid" <mwp.reid at qub.ac.uk>
Sent: Wednesday, August 20, 2003 4:53 PM
Subject: [dba-SQLServer]Execute a DTS from Access -- Sample Code


> 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
>
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
>
>




More information about the dba-SQLServer mailing list