您现在的位置是:首页
>
主程序怎样调用子程序 .NET程序调用SSIS中的DTS包
.NET程序调用SSIS中的DTS包 以下代码是在VB NET(Framework )中调用SQLServer 的I tergratio Service中DTS包 如果要在We Service中调用D

.NET程序调用SSIS中的DTS包
以下代码是在VB NET(Framework )中调用SQLServer 的Intergration Service中DTS包 如果要在WebService中调用DTS 必须用VB NET语言 因为如果用C#编写WebService的话 将无法引用Microsoft SqlServer ManagedDTS组件 将NEORK SERVICE帐户添加到Administrator组中 否则将不能执行DTS (会带来安全漏洞) Imports Microsoft SqlServer Dts Runtime WebService代码 _ Public Function ExecutePackage() As Integer Dim pkg As String = D:DevelopmentProgramePackageDevPackageMG TSJF PKG dtsx Dim app As Application = New Application() Dim p As Package = app LoadPackage(pkg Nothing) p InteractiveMode = True Dim vir As Variables = p Variables vir( 用户::PackageID ) Value = If p Execute(Nothing vir Nothing Nothing Nothing) = DTSExecResult Success Then Return Else Return End If End Function lishixinzhi/Article/program/net/201311/12761 很赞哦! (1049)