Share via


AdoDotNetConnectionSupport Class

Definition

Represents an implementation of the IVsDataConnectionSupport interface, and indirectly the IVsDataCommand, IVsDataAsyncCommand and IVsDataTransaction interfaces, using appropriate ADO .NET objects.

public ref class AdoDotNetConnectionSupport : Microsoft::VisualStudio::Data::Framework::DataConnectionSupport, Microsoft::VisualStudio::Data::Core::IVsDataSiteableObject<Microsoft::VisualStudio::Data::Core::IVsDataProvider ^>
public class AdoDotNetConnectionSupport : Microsoft.VisualStudio.Data.Framework.DataConnectionSupport, Microsoft.VisualStudio.Data.Core.IVsDataSiteableObject<Microsoft.VisualStudio.Data.Core.IVsDataProvider>
type AdoDotNetConnectionSupport = class
    inherit DataConnectionSupport
    interface IVsDataSiteableObject<IVsDataProvider>
Public Class AdoDotNetConnectionSupport
Inherits DataConnectionSupport
Implements IVsDataSiteableObject(Of IVsDataProvider)
Inheritance
Implements

Constructors

AdoDotNetConnectionSupport()

Initializes an instance of the AdoDotNetConnectionSupport class.

Properties

Connection

Gets the DbConnection object being used by the current connection support instance.

ConnectionString

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

ConnectionTimeout

Gets or sets the amount of time, in seconds, to wait to establish a connection before terminating the attempt and generating a time-out error.

CurrentCommand

Gets the DbCommand object currently being used by the current connection support instance.

CurrentTransaction

Gets the DbTransaction object currently being used by the current connection support instance.

InAsyncMode

Gets a value indicating whether the connection is in an asynchronous mode.

ParentProvider

Gets the current instance of the parent service provider.

(Inherited from ServiceProvider)
ProviderObject

Gets the underlying provider object for the specified connection.

ServiceProvider

Gets the global Visual Studio service provider.

(Inherited from DataConnectionSupport)
Site

Gets or sets the site.

(Inherited from DataSiteableServiceProvider<T>)
State

Gets the state of the data connection.

Methods

AddService(Type, Object, Boolean)

Adds the specified service to the collection of service objects or to the parent service container.

(Inherited from ServiceProvider)
AddService(Type, Object)

Adds the specified service to the internal collection of services.

(Inherited from ServiceProvider)
AddService(Type, ServiceCreatorCallback, Boolean)

Adds the specified service to the internal collection of services or to the parent service container.

(Inherited from ServiceProvider)
AddService(Type, ServiceCreatorCallback)

Adds the specified service to the internal collection of services.

(Inherited from ServiceProvider)
BeginTransactionCore()

Initiates a transaction.

Close()

Closes the current data connection.

CommitTransactionCore()

Commits a transaction.

CreateParameterCore()

Creates a new data parameter with interface IVsDataProvider.

CreateParameterFrom(DbParameter)

Creates a new data parameter with interface IVsDataProvider, using a copy of the specified data parameter.

CreateService(IServiceContainer, Type)

Creates a new service object based on the specified interface service type.

DeriveParametersCore(String, DataCommandType, Int32)

Derives parameters that can be specified for a given command.

DeriveParametersOn(DbCommand)

Override to derive parameters from the given command.

DeriveSchemaCore(String, DataCommandType, IVsDataParameter[], Int32)

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

Dispose()

Releases all resources held by the data connection.

(Inherited from DataConnectionSupport)
Dispose(Boolean)

Releases all resources held by the data connection.

ExecuteCore(String, DataCommandType, IVsDataParameter[], Int32)

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

ExecuteWithoutResultsCore(String, DataCommandType, IVsDataParameter[], Int32)

Executes a specified command, optionally with parameters. Does not return any query results.

GetCommand(String, DataCommandType, IVsDataParameter[], Int32)

Constructs a DbCommand object from the given command string.

GetCommandType(DataCommandType)

Converts an enumeration value from DataCommandType to its corresponding value in the CommandType enumeration.

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)
Initialize(Object)

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

OnMessageReceived(DataConnectionMessageReceivedEventArgs)

Handles the MessageReceived event.

(Inherited from DataConnectionSupport)
OnSiteChanged(EventArgs)

Raises the SiteChanged event.

(Inherited from DataSiteableServiceProvider<T>)
OnStateChanged(DataConnectionStateChangedEventArgs)

Handles the StateChanged event.

(Inherited from DataConnectionSupport)
Open(Boolean)

Opens the specified data connection.

PrepareCore(String, DataCommandType, IVsDataParameter[], Int32)

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

RemoveService(Type, Boolean)

Removes the specified service from the internal services collection or from the parent service container.

(Inherited from ServiceProvider)
RemoveService(Type)

Removes the specified service from the internal services collection

(Inherited from ServiceProvider)
RollbackTransactionCore()

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

SetParameters(DbCommand, IVsDataParameter[])

Adds new parameters to the given DbCommand command from the specified array of IVsDataParameter parameters.

Events

MessageReceived

Occurs when a message is received from the data source.

(Inherited from DataConnectionSupport)
SiteChanged

Occurs when the site has changed.

(Inherited from DataSiteableServiceProvider<T>)
StateChanged

Occurs when the state of the data connection has changed.

(Inherited from DataConnectionSupport)

Explicit Interface Implementations

IServiceProvider.QueryService(Guid, Guid, IntPtr)

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

(Inherited from ServiceProvider)
IVsDataSiteableObject<IVsDataProvider>.Site

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