一个ssis包,设置了包密码,但c#调用失败,代码如下
C# code
Microsoft.SqlServer.Dts.Runtime.Wrapper.Application dtsApplication = new Microsoft.SqlServer.Dts.Runtime.Wrapper.Application();
Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSPackage100 package = dtsApplication.LoadFromSQLServer(
"包名",
"ip",
"用户",
"密码",
true,
null);
package.PackagePassword = "1234";
Microsoft.SqlServer.Dts.Runtime.Wrapper.DTSExecResult result = package.Execute();
if (result.Equals(Microsoft.SqlServer.Dts.Runtime.Wrapper.DTSExecResult.DTSER_SUCCESS))
MessageBox.Show("ssis包调用成功");
else
{
MessageBox.Show("ssis包调用失败");
}
断点调试LoadFromSQLServer过去了,但Execute失败,
.
它是返回.DTSExecResult.DTSER_FAIL, |