|
I have no problem with the console program written in c#, but it cannot be ported to the web.
The phenomenon is that the program does not go down in the package.LoadFromSQLServer sentence, the web page has been waiting until it times out
My procedure is as follows:
string packageName = "test";
object pVarPersistStgOfHost = null;
DTS.PackageClass package = new DTS.PackageClass();
try
{
package.LoadFromSQLServer(".","sa","", DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, null, null, null, packageName, ref pVarPersistStgOfHost);
Console.WriteLine("DTS Package Executing..");
package.Execute();
Console.WriteLine("DTS Package Completed");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
finally
{
package.UnInitialize();
package = null;
} |
|