executing DTS package from ASP.NET with VB.NET
Posted on 2004-04-28
I need to run a simple DTS package from the asp.net page. i have button on the webform i need to run the dts package for that button click event.
I was trying to find examples on the internet, but i could not find a simple answer..
Using one of the articles i have created ref to dts dll file and was working with it. My dts execution process is taking to too long, in fact i never had it finished. when i run the package in enterprise manager it takes less than a min.
here is the sample code that i used.
Dim package As DTS.Package2Class
package = New DTS.Package2Class
Dim infos As DTS.SavedPackageInfos
package.LoadFromSQLServer("(LOCAL)", "sa", "passwd", DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "", "", "", "ProcessDB", "")
package = Nothing
I would be thankfull if some one could point me to a simple example or a sample code.
Thank you in advance