|
我用c#写的控制台程序没有问题,但是移植到web上就不行。
现象是在package.LoadFromSQLServer那一句程序就不往下走了,网页一直就在等,直到超时
我的程序如下:
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;
}
|
|