Share via


ConnectionManager 類別

Provides the information that you must have to connect to a data source. All classes that inherit from the ConnectionManager contain the same properties and methods. The ConnectionManager class isolates the implementation details of the different connection types from the runtime. This enables the runtime to interact with each connection manager in a consistent and predictable manner. Connection managers contain a set of stock properties that all connections have in common, such as the Name, ID, Description, and ConnectionString. However, each connection type has additional properties that are specific to that connection type. These can be accessed through the Properties collection.This class cannot be inherited.

繼承階層

System. . :: . .Object
  Microsoft.SqlServer.Dts.Runtime. . :: . .DtsObject
    Microsoft.SqlServer.Dts.Runtime..::..ConnectionManager

命名空間:  Microsoft.SqlServer.Dts.Runtime
組件:  Microsoft.SqlServer.ManagedDTS (在 Microsoft.SqlServer.ManagedDTS.dll 中)

語法

'宣告
Public NotInheritable Class ConnectionManager _
    Inherits DtsObject _
    Implements IDTSObjectHost, IDTSPersist, IDTSName, IComponent,  _
    IDisposable, IDTSPropertiesProvider, IDTSPackagePath
'用途
Dim instance As ConnectionManager
public sealed class ConnectionManager : DtsObject, 
    IDTSObjectHost, IDTSPersist, IDTSName, IComponent, IDisposable, 
    IDTSPropertiesProvider, IDTSPackagePath
public ref class ConnectionManager sealed : public DtsObject, 
    IDTSObjectHost, IDTSPersist, IDTSName, IComponent, IDisposable, 
    IDTSPropertiesProvider, IDTSPackagePath
[<SealedAttribute>]
type ConnectionManager =  
    class
        inherit DtsObject
        interface IDTSObjectHost
        interface IDTSPersist
        interface IDTSName
        interface IComponent
        interface IDisposable
        interface IDTSPropertiesProvider
        interface IDTSPackagePath
    end
public final class ConnectionManager extends DtsObject implements IDTSObjectHost, IDTSPersist, IDTSName, IComponent, IDisposable, IDTSPropertiesProvider, IDTSPackagePath

ConnectionManager 型別公開下列成員。

屬性

  名稱 說明
公用屬性 ConnectionString Gets or sets the connection string used to establish a connection to a data source.
公用屬性 CreationName Returns the string that is used by the runtime to create an instance of the ConnectionManager object and to add the object to the Connections collection. This property is read-only.
公用屬性 DelayValidation Gets or sets a Boolean that indicates whether package validation is delayed until the package runs.
公用屬性 Description Gets or sets the description of the ConnectionManager object.
公用屬性 HostType Gets an enumeration that describes the type of host that the connection is being used by. This property is read-only.
公用屬性 ID Gets the ID of the ConnectionManager. This property is read-only.
公用屬性 InnerObject Returns the specific connection type that was created. This property is read-only.
公用屬性 Name Gets or sets the name of the ConnectionManager object.
公用屬性 Properties Gets a collection of property objects for the ConnectionManager. This is the method of accessing the properties of the specific connection that is being hosted by the connection manager. This property is read-only.
公用屬性 ProtectionLevel Gets or sets the level of encryption performed on sensitive data that is contained in the package.
公用屬性 Site 基礎結構。
公用屬性 SupportsDTCTransactions Returns a Boolean that indicates if the connection supports Microsoft Distributed Transaction Coordinator (MS DTC) transactions.

上層

方法

  名稱 說明
公用方法 AcquireConnection Creates an instance of the connection type.
公用方法 Dispose Releases the resources used by the ConnectionManager.
公用方法 Equals Determines whether two object instances are equal. (繼承自 DtsObject。)
受保護的方法 Finalize (繼承自 Object。)
公用方法 GetExpression Returns a String that contains the expression for the specified property. Null means that no expression has been assigned.
公用方法 GetHashCode Returns the hash code for this instance. (繼承自 DtsObject。)
公用方法 GetPackagePath Gets or sets the path of the package that the connection applies to.
公用方法 GetType (繼承自 Object。)
公用方法 LoadFromXML This method is not callable by your application code. To load a package that has been saved as .xml, use the Application..::..LoadPackage method.
受保護的方法 MemberwiseClone (繼承自 Object。)
公用方法 ReleaseConnection Frees the connection established during AcquireConnection. Called at design time and runtime.
公用方法 SaveToXML This method is not callable by your application code. To save a package as .xml, use the Application..::..SaveToXml method.
公用方法 SetExpression Assigns the specified expression to the property. Specify nullNothingnullptrunitnull 參考 (在 Visual Basic 中為 Nothing) to remove an existing expression from the property.
公用方法 SetQualifier Changes a qualifier on the connection manager after the connection manager has been created but before it is used in a running package.
公用方法 ToString (繼承自 Object。)

上層

事件

  名稱 說明
公用事件 Disposed Adds an event handler to listen to the Disposed event on the ConnectionManager.

上層

備註

A connection manager is a logical representation of a connection. At design time, in the graphical user interface, you use a connection manager to describe the physical connection that the runtime creates when the package runs. Integration Services provides different types of connection managers that enable packages to connect to a variety of data sources. For example, there is an ActiveX Data Objects (ADO) connection manager, an ADO.NET connection manager, an ODBC connection manager, and so on. For more information, see Extending Packages with Custom Objects.

執行緒安全性

這個型別的任何公用 static (在 Visual Basic 中為 Shared) 成員都是執行緒安全的。並不是所有的執行個體成員都保證可以用於所有的執行緒。