Share via


AdoDotNetConnectionSupport Class

Provides a managed implementation of the DataConnectionSupport, DataCommand, and DataTransaction classes using the ADO.NET IDbConnection, IDbCommand, and IDbTransactioninterfaces, respectively; also provides a simple way to supply an implementation of the DataSourceVersionComparerclass.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.ServiceProvider
    Microsoft.VisualStudio.Data.ServiceProviderWithSite
      Microsoft.VisualStudio.Data.DataConnectionSupport
        Microsoft.VisualStudio.Data.AdoDotNet.AdoDotNetConnectionSupport

Namespace:  Microsoft.VisualStudio.Data.AdoDotNet
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

'Declaration
Public Class AdoDotNetConnectionSupport _
    Inherits DataConnectionSupport
public class AdoDotNetConnectionSupport : DataConnectionSupport
public ref class AdoDotNetConnectionSupport : public DataConnectionSupport
type AdoDotNetConnectionSupport =  
    class 
        inherit DataConnectionSupport 
    end
public class AdoDotNetConnectionSupport extends DataConnectionSupport

The AdoDotNetConnectionSupport type exposes the following members.

Constructors

  Name Description
Public method AdoDotNetConnectionSupport Class constructor. Initializes an instance of the AdoDotNetConnectionSupport class with a specified ADO.NET provider name.

Top

Properties

  Name Description
Protected property BaseCommand Retrieves the main IDbCommand object being used for executing commands on this connection.
Protected property Connection Retrieves the IDbConnection object being used by the current connection support instance.
Public property ConnectionString Retrieves or sets a string representation of information required to establish a specified data source connection. (Overrides DataConnectionSupport.ConnectionString.)
Public property ConnectionTimeout Retrieves or sets the amount of time, in seconds, to wait to establish a connection before terminating the attempt and generating a timeout error. (Overrides DataConnectionSupport.ConnectionTimeout.)
Public property CurrentTransactionLevel Retrieves the current transaction level.
Protected property ExecutingCommand Retrieves the IDbCommand instance currently being used for execution.
Protected property PreparedCommands Retrieves a list of IDbCommand objects that have been previously prepared.
Public property ProviderObject Retrieves the underlying provider object for the specified connection. (Overrides DataConnectionSupport.ProviderObject.)
Protected property ServiceTypes Retrieves a list of service types used to convert the unmanaged QueryService method call, in which a service GUID is specified, into a managed IServiceProvider.GetService method call, in which a managed type is specified. (Inherited from ServiceProvider.)
Public property Site Retrieves or sets the site object instance. (Inherited from ServiceProviderWithSite.)
Public property State Retrieves the state of the data connection. (Overrides DataConnectionSupport.State.)
Protected property Transaction Retrieves the current IDbTransaction, if any.

Top

Methods

  Name Description
Public method BeginTransaction Initiates a transaction and returns the new current transaction level.
Public method Close Closes the specified data connection. (Overrides DataConnectionSupport.Close().)
Public method CommitTransaction Commits a transaction and returns the new current transaction level.
Public method CompareVersions Compares two data-source version strings and returns a value indicating whether one is less than, equal to, or greater than the other.
Protected method CreateDataSourceInformation Creates a DataSourceInformation object instance.
Protected method CreateObjectIdentifierConverter Creates a DataObjectIdentifierConverter object instance.
Protected method CreateObjectItemComparer Creates a object instance.
Public method CreateParameter Creates a DataParameter object.
Public method DeriveParameters Derives parameters that can be specified for a given command
Public method DeriveSchema Derives the schema returned from a specified command, indicating the layout of items and blocks in a given data reader.
Public method Dispose() Performs tasks associated with freeing, releasing, or resetting resources. (Inherited from DataConnectionSupport.)
Protected method Dispose(Boolean) Releases all resources held by the data connection. (Overrides DataConnectionSupport.Dispose(Boolean).)
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method Execute Executes a specified command, optionally with parameters, and returns results as a DataReader object.
Public method ExecuteWithoutResults Executes a command, optionally with parameters, but does not request results, instead returning an integer indicating the outcome of the call.
Protected method Finalize Finalizes the connection. (Inherited from DataConnectionSupport.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetService(Guid) Retrieves a service with a specified service GUID. (Inherited from ServiceProvider.)
Public method GetService(Type) Retrieves a service of the specified type. (Inherited from ServiceProvider.)
Protected method GetServiceImpl(Guid) Provides the implementation for retrieving a service with a specific GUID. (Inherited from ServiceProvider.)
Protected method GetServiceImpl(Type) Enables retrieving implementation services. (Overrides DataConnectionSupport.GetServiceImpl(Type).)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Initialize Initializes the specified ADO.NET connection using a specified provider. (Overrides DataConnectionSupport.Initialize(Object).)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnSiteChanged Raises the SiteChanged event. (Inherited from ServiceProviderWithSite.)
Public method Open Opens the specified data connection. (Overrides DataConnectionSupport.Open(Boolean).)
Public method Prepare Prepares the specified command on the data source to be executed; the command may be executed multiple times, with varying parameters.
Protected method RaiseMessageReceived Raises the MessageReceivedevent on the enclosing DataConnection instance. (Inherited from DataConnectionSupport.)
Protected method RaiseStateChanged Raises the state changed event on the enclosing DataConnection instance. (Inherited from DataConnectionSupport.)
Public method RollbackTransaction Rolls back, or voids, a transaction and returns the new current transaction level.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event SiteChanged Event raised when the Site property has changed. (Inherited from ServiceProviderWithSite.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IObjectWithSite.GetSite Retrieves the last site set using the IObjectWithSite.SetSite method. If there is no known site, an exception is thrown. (Inherited from ServiceProviderWithSite.)
Explicit interface implemetationPrivate method IServiceProvider.QueryService Performs as a factory for services that are exposed through an implementation of IServiceProvider. (Inherited from ServiceProvider.)
Explicit interface implemetationPrivate method IObjectWithSite.SetSite Provides a site's IUnknown pointer to a given object. (Inherited from ServiceProviderWithSite.)

Top

Remarks

This class provides a complete, managed implementation that is created by default for ADO.NET data providers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Data.AdoDotNet Namespace