Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing SQL Server DTS Packages
Message
From
13/05/2002 11:44:37
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00655070
Message ID:
00655717
Views:
29
This message has been marked as the solution to the initial question of the thread.
Hi Randy,

I've just started using the DTS object myself in VFP. This kb article does give you a good starting point (wish I had seen this last week < g >), but I want to point out that SQL2000 will be slightly different than SQL7 ... you didn't say which you were using.

The article shows:
loPackage = CREATEOBJECT('dts.package')
For SQL2000, you would want to use:
loPackage = CREATEOBJECT('dts.package2')
Also, as you may have already figured out, passing parameters is easy enough using GlobalVariables:
loPackage.GlobalVariables.Item('MyPassword').Value = 'bob'
What I had a hard time figuring out was how to find out whether the package executed ok or not. I finally settled on having the package set a GlobalVariable when it successfully completed which I can then check after the package executes.

Have fun!

~~Bonnie


>Excellent! Definitely a good start. Thanks.
>
>>Take a look at HOWTO: Execute a SQL Server 7.0 DTS Package from Visual FoxPro mskb #Q247356.
>>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform