Partilhar via


Classe 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.

Hierarquia de herança

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

Namespace:  Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (em Microsoft.SqlServer.ManagedDTS.dll)

Sintaxe

'Declaração
Public NotInheritable Class ConnectionManager _
    Inherits DtsObject _
    Implements IDTSObjectHost, IDTSPersist, IDTSName, IComponent,  _
    IDisposable, IDTSPropertiesProvider, IDTSPropertiesProviderEx, IDTSPackagePath, IDTSExecutionPath
'Uso
Dim instance As ConnectionManager
public sealed class ConnectionManager : DtsObject, 
    IDTSObjectHost, IDTSPersist, IDTSName, IComponent, IDisposable, 
    IDTSPropertiesProvider, IDTSPropertiesProviderEx, IDTSPackagePath, IDTSExecutionPath
public ref class ConnectionManager sealed : public DtsObject, 
    IDTSObjectHost, IDTSPersist, IDTSName, IComponent, IDisposable, 
    IDTSPropertiesProvider, IDTSPropertiesProviderEx, IDTSPackagePath, IDTSExecutionPath
[<SealedAttribute>]
type ConnectionManager =  
    class 
        inherit DtsObject 
        interface IDTSObjectHost 
        interface IDTSPersist 
        interface IDTSName 
        interface IComponent 
        interface IDisposable 
        interface IDTSPropertiesProvider 
        interface IDTSPropertiesProviderEx 
        interface IDTSPackagePath 
        interface IDTSExecutionPath 
    end
public final class ConnectionManager extends DtsObject implements IDTSObjectHost, IDTSPersist, IDTSName, IComponent, IDisposable, IDTSPropertiesProvider, IDTSPropertiesProviderEx, IDTSPackagePath, IDTSExecutionPath

O tipo ConnectionManager expõe os membros a seguir.

Propriedades

  Nome Descrição
Propriedade pública ConnectionString Gets or sets the connection string used to establish a connection to a data source.
Propriedade pública 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.
Propriedade pública DelayValidation Gets or sets a Boolean that indicates whether package validation is delayed until the package runs.
Propriedade pública Description Gets or sets the description of the ConnectionManager object.
Propriedade pública HasExpressions Gets a value that indicates whether the connection manager has properties set through expressions.
Propriedade pública HostType Gets an enumeration that describes the type of host that the connection is being used by. This property is read-only.
Propriedade pública ID Gets the ID of the ConnectionManager. This property is read-only.
Propriedade pública InnerObject Returns the specific connection type that was created. This property is read-only.
Propriedade pública Name Gets or sets the name of the ConnectionManager object.
Propriedade pública OfflineMode Gets or sets a value that indicates whether the connection manager is in offline mode.
Propriedade pública 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.
Propriedade pública ProtectionLevel Gets or sets the level of encryption performed on sensitive data that is contained in the package.
Propriedade pública Qualifier Gets or sets the qualifier for the connection manager.
Propriedade pública Scope Gets the scope of the connection manager.
Propriedade pública Site Infraestrutura. Gets or sets the site of the connection manager.
Propriedade pública SupportsDTCTransactions Returns a Boolean that indicates if the connection supports Microsoft Distributed Transaction Coordinator (MS DTC) transactions.
Propriedade pública VariableDispenser Gets the dispenser of the variables in the connection manager.
Propriedade pública Variables Gets the collection of variables in the connection manager.

Início

Métodos

  Nome Descrição
Método público AcquireConnection Creates an instance of the connection type.
Método público Dispose Releases the resources used by the ConnectionManager.
Método público Equals Determines whether two object instances are equal. (Herdado de DtsObject.)
Método público GetExecutionPath Returns the execution path of the connection manager.
Método público GetExpression Returns a String that contains the expression for the specified property. Null means that no expression has been assigned.
Método público GetHashCode Returns the hash code for this instance. (Herdado de DtsObject.)
Método público GetPackagePath Gets or sets the path of the package that the connection applies to.
Método público GetType (Herdado de Object.)
Método público LoadFromXML(String, IDTSEvents) This method is not callable by your application code. To load a package that has been saved as .xml, use the Application.LoadPackage method.
Método público LoadFromXML(XmlNode, IDTSEvents) This method is not callable by your application code. To load a package that has been saved as .xml, use the Application.LoadPackage method.
Método público ReleaseConnection Frees the connection established during AcquireConnection. Called at design time and runtime.
Método público SaveToXML This method is not callable by your application code. To save a package as .xml, use the Application.SaveToXml method.
Método público SetExpression Assigns the specified expression to the property. Specify nulluma referência nula (Nothing no Visual Basic) to remove an existing expression from the property.
Método público SetQualifier Changes a qualifier on the connection manager after the connection manager has been created but before it is used in a running package.
Método público ToString (Herdado de Object.)

Início

Eventos

  Nome Descrição
Evento público Disposed Adds an event handler to listen to the Disposed event on the ConnectionManager.

Início

Comentários

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 Estendendo pacotes com objetos personalizados.

Segurança de thread

Qualquer membro público static (Shared no Visual Basic) desse tipo é seguro para threads. Não há garantia de que qualquer membro de instância seja seguro para threads.

Consulte também

Referência

Namespace Microsoft.SqlServer.Dts.Runtime