IDTSApplication100.LoadFromSQLServer 方法

此 API 支持 SQL Server 2012 基础结构,但不能通过代码直接使用。

Loads a package from SQL Server by specifying the server name, user name, and password.

命名空间:  Microsoft.SqlServer.Dts.Runtime.Wrapper
程序集:  Microsoft.SqlServer.DTSRuntimeWrap(在 Microsoft.SqlServer.DTSRuntimeWrap.dll 中)

语法

声明
Function LoadFromSQLServer ( _
    bstrPackagePath As String, _
    bstrServerName As String, _
    bstrServerUserName As String, _
    bstrServerPassword As String, _
    bLoadNeutral As Boolean, _
    pEvents As IDTSEvents100 _
) As IDTSPackage100
用法
Dim instance As IDTSApplication100 
Dim bstrPackagePath As String 
Dim bstrServerName As String 
Dim bstrServerUserName As String 
Dim bstrServerPassword As String 
Dim bLoadNeutral As Boolean 
Dim pEvents As IDTSEvents100 
Dim returnValue As IDTSPackage100 

returnValue = instance.LoadFromSQLServer(bstrPackagePath, _
    bstrServerName, bstrServerUserName, _
    bstrServerPassword, bLoadNeutral, _
    pEvents)
IDTSPackage100 LoadFromSQLServer(
    string bstrPackagePath,
    string bstrServerName,
    string bstrServerUserName,
    string bstrServerPassword,
    bool bLoadNeutral,
    IDTSEvents100 pEvents
)
IDTSPackage100^ LoadFromSQLServer(
    [InAttribute] String^ bstrPackagePath, 
    [InAttribute] String^ bstrServerName, 
    [InAttribute] String^ bstrServerUserName, 
    [InAttribute] String^ bstrServerPassword, 
    [InAttribute] bool bLoadNeutral, 
    [InAttribute] IDTSEvents100^ pEvents
)
abstract LoadFromSQLServer : 
        bstrPackagePath:string * 
        bstrServerName:string * 
        bstrServerUserName:string * 
        bstrServerPassword:string * 
        bLoadNeutral:bool * 
        pEvents:IDTSEvents100 -> IDTSPackage100
function LoadFromSQLServer(
    bstrPackagePath : String, 
    bstrServerName : String, 
    bstrServerUserName : String, 
    bstrServerPassword : String, 
    bLoadNeutral : boolean, 
    pEvents : IDTSEvents100
) : IDTSPackage100

参数

  • bstrPackagePath
    类型:System.String
    The name and path of the package to load.
  • bstrServerName
    类型:System.String
    The name of the instance of SQL Server that the package is loaded from.
  • bstrServerUserName
    类型:System.String
    The account name used to log on to the server.
  • bstrServerPassword
    类型:System.String
    The password of the account.
  • bLoadNeutral
    类型:System.Boolean
    true to load the package as neutral threaded; false to load the package as apartment threaded.

返回值

类型:Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSPackage100
The package that was loaded.

请参阅

参考

IDTSApplication100 接口

Microsoft.SqlServer.Dts.Runtime.Wrapper 命名空间