Compartir a través de


AdoDotNetConnectionSupport Class

Definition

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.

public ref class AdoDotNetConnectionSupport : Microsoft::VisualStudio::Data::DataConnectionSupport
public class AdoDotNetConnectionSupport : Microsoft.VisualStudio.Data.DataConnectionSupport
type AdoDotNetConnectionSupport = class
    inherit DataConnectionSupport
Public Class AdoDotNetConnectionSupport
Inherits DataConnectionSupport
Inheritance

Constructors

AdoDotNetConnectionSupport(String)

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

Properties

BaseCommand

Retrieves the main IDbCommand object being used for executing commands on this connection.

Connection

Retrieves the IDbConnection object being used by the current connection support instance.

ConnectionString

Retrieves or sets a string representation of information required to establish a specified data source connection.

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.

CurrentTransactionLevel

Retrieves the current transaction level.

ExecutingCommand

Retrieves the IDbCommand instance currently being used for execution.

PreparedCommands

Retrieves a list of IDbCommand objects that have been previously prepared.

ProviderObject

Retrieves the underlying provider object for the specified connection.

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)
Site

Retrieves or sets the site object instance.

(Inherited from ServiceProviderWithSite)
State

Retrieves the state of the data connection.

Transaction

Retrieves the current IDbTransaction, if any.

Methods

BeginTransaction()

Initiates a transaction and returns the new current transaction level.

Close()

Closes the specified data connection.

CommitTransaction()

Commits a transaction and returns the new current transaction level.

CompareVersions(String, String)

Compares two data-source version strings and returns a value indicating whether one is less than, equal to, or greater than the other.

CreateDataSourceInformation()

Creates a DataSourceInformation object instance.

CreateObjectIdentifierConverter()

Creates a DataObjectIdentifierConverter object instance.

CreateObjectItemComparer()

Creates a object instance.

CreateParameter()

Creates a DataParameter object.

DeriveParameters(String, Int32, Int32)

Derives parameters that can be specified for a given command

DeriveSchema(String, Int32, DataParameter[], Int32)

Derives the schema returned from a specified command, indicating the layout of items and blocks in a given data reader.

Dispose()

Performs tasks associated with freeing, releasing, or resetting resources.

(Inherited from DataConnectionSupport)
Dispose(Boolean)

Releases all resources held by the data connection.

Execute(String, Int32, DataParameter[], Int32)

Executes a specified command, optionally with parameters, and returns results as a DataReader object.

ExecuteWithoutResults(String, Int32, DataParameter[], Int32)

Executes a command, optionally with parameters, but does not request results, instead returning an integer indicating the outcome of the call.

GetService(Guid)

Retrieves a service with a specified service GUID.

(Inherited from ServiceProvider)
GetService(Type)

Retrieves a service of the specified type.

(Inherited from ServiceProvider)
GetServiceImpl(Guid)

Provides the implementation for retrieving a service with a specific GUID.

(Inherited from ServiceProvider)
GetServiceImpl(Type)

Enables retrieving implementation services.

Initialize(Object)

Initializes the specified ADO.NET connection using a specified provider.

OnSiteChanged(EventArgs)

Raises the SiteChanged event.

(Inherited from ServiceProviderWithSite)
Open(Boolean)

Opens the specified data connection.

Prepare(String, Int32, Int32)

Prepares the specified command on the data source to be executed; the command may be executed multiple times, with varying parameters.

RaiseMessageReceived(String)

Raises the MessageReceivedevent on the enclosing DataConnection instance.

(Inherited from DataConnectionSupport)
RaiseStateChanged(DataConnectionState, DataConnectionState)

Raises the state changed event on the enclosing DataConnection instance.

(Inherited from DataConnectionSupport)
RollbackTransaction()

Rolls back, or voids, a transaction and returns the new current transaction level.

Events

SiteChanged

Event raised when the Site property has changed.

(Inherited from ServiceProviderWithSite)

Explicit Interface Implementations

IObjectWithSite.GetSite(Guid, IntPtr)

Retrieves the last site set using the IObjectWithSite.SetSite(Object) method. If there is no known site, an exception is thrown.

(Inherited from ServiceProviderWithSite)
IObjectWithSite.SetSite(Object)

Provides a site's IUnknown pointer to a given object.

(Inherited from ServiceProviderWithSite)
IServiceProvider.QueryService(Guid, Guid, IntPtr)

Performs as a factory for services that are exposed through an implementation of IServiceProvider.

(Inherited from ServiceProvider)

Extension Methods

QueryService(IServiceProvider, Guid)

Gets a service exposed by a service provider based on its service GUID.

QueryService<TService>(IServiceProvider)

Gets a service exposed by a service provider based on its service type.

Applies to