I want to run a DTS package from an ASP.NEt application
and pass a Date variable to the package without which it cannot run
can anyone tell me how to achive this?
JVS thanks so much for the link!
JB: Can you also tell if you have to remove the Global variable and then add it again with its new value or if you just used a statement like
objPackage.GlobalVariables("FromDate").Value = <mynewdate>
before executing it?
Thanks.
thanks tb.
I am still having trouble running the my DTS package: it just doesnt seem to execute ! and no errors are thrown either,
(I also posted it as a new question today: thread961-860379) trying to find out where I am going wrong?
thanks.
here is my code:
//-----------------------------begin----------
Package2Class package = new Package2Class();
object pVarPersistStgOfHost = null;
package.LoadFromSQLServer("(local)",null,null,DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection,null,null,null,packageName,ref pVarPersistStgOfHost);
The only difference that I can see to my code is that I do not remove and add the Global variable ... I just pass the new value through.
As I said before >I know you've asked for ASP.NET, but in VB 6 you'll do it like this ...
So here is my code for executing ...
Dim objPackage As DTS.Package2
'Instanciate the DTS package object
Set objPackage = New DTS.Package2
'Set the server/username/password and the DTS package to be run
objPackage.LoadFromSQLServer Server, UserName, Password, DTSSQLStgFlag_Default, "", "", "", "DTS_PackageName"
thanks tb.my code seems to be fine too, I think the problem is that I am trying to transfer contents from a text file that is on a remote drive ( which I mapped to teh sql server machine) so when I try to run it from code, it cannot connect to the drive... I dont knwo which user name and password it uses.. is there a work around for this or a way to force it to conenct to teh remote file location?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.