AdoDotNetConnectionSupport 类

使用 ADO.NETIDbConnectionIDbCommandIDbTransaction接口,提供 DataConnectionSupportDataCommandDataTransaction 选件类的托管实现,分别;还提供了一种简单的方法提供 DataSourceVersionComparer选件类的实现。

继承层次结构

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

命名空间:  Microsoft.VisualStudio.Data.AdoDotNet
程序集:  Microsoft.VisualStudio.Data(在 Microsoft.VisualStudio.Data.dll 中)

语法

声明
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

AdoDotNetConnectionSupport 类型公开以下成员。

构造函数

  名称 说明
公共方法 AdoDotNetConnectionSupport 选件类构造函数。初始化 AdoDotNetConnectionSupport 选件类的实例具有指定的 ADO.NET 提供程序的名称。

页首

属性

  名称 说明
受保护的属性 BaseCommand 检索为执行此连接的命令使用的母版 IDbCommand 对象。
受保护的属性 Connection 检索当前连接使用的 IDbConnection 对象支持实例。
公共属性 ConnectionString 检索或设置所需的信息的字符串表示形式生成指定的数据源将连接。 (重写 DataConnectionSupport.ConnectionString。)
公共属性 ConnectionTimeout (检索或设置时,等待,在终止在尝试和生成超时错误之前建立连接。 (重写 DataConnectionSupport.ConnectionTimeout。)
公共属性 CurrentTransactionLevel 检索当前事务级别。
受保护的属性 ExecutingCommand 检索为执行当前使用的 IDbCommand 实例。
受保护的属性 PreparedCommands 检索的 IDbCommand 对象列表之前做好准备。
公共属性 ProviderObject 检索指定的连接的基础提供程序对象。 (重写 DataConnectionSupport.ProviderObject。)
受保护的属性 ServiceTypes 检索服务类型列出的转换非托管 QueryService 方法调用,服务GUID指定,到托管 IServiceProvider.GetService 方法调用,托管类型指定。 (继承自 ServiceProvider。)
公共属性 Site 检索或设置站点对象实例。 (继承自 ServiceProviderWithSite。)
公共属性 State 检索数据连接的状态。 (重写 DataConnectionSupport.State。)
受保护的属性 Transaction 检索当前 IDbTransaction,因此,如果有的话)。

页首

方法

  名称 说明
公共方法 BeginTransaction 启动事务并返回新的当前事务级别。
公共方法 Close 关闭指定的数据连接。 (重写 DataConnectionSupport.Close()。)
公共方法 CommitTransaction 提交事务并返回新的当前事务级别。
公共方法 CompareVersions 比较两个数据源版本字符串并返回一个指示是否的值小于,等于或大于其他。
受保护的方法 CreateDataSourceInformation 创建 DataSourceInformation 对象实例。
受保护的方法 CreateObjectIdentifierConverter 创建 DataObjectIdentifierConverter 对象实例。
受保护的方法 CreateObjectItemComparer 创建对象实例。
公共方法 CreateParameter 创建一个 DataParameter 对象。
公共方法 DeriveParameters 派生可用于特定命令指定的参数
公共方法 DeriveSchema 从指定的命令在特定数据读取器派生返回的模式,指示项目格式和块。
公共方法 Dispose() 执行与释放或重置资源关联的任务。 (继承自 DataConnectionSupport。)
受保护的方法 Dispose(Boolean) 释放数据连接占用的所有资源。 (重写 DataConnectionSupport.Dispose(Boolean)。)
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
公共方法 Execute 执行一个指定的命令,可以选择使用参数,并将结果作为 DataReader 对象。
公共方法 ExecuteWithoutResults 执行命令,可以选择使用参数,但未请求结果,而是返回指示调用的结果整数。
受保护的方法 Finalize 完成连接。 (继承自 DataConnectionSupport。)
公共方法 GetHashCode 用作特定类型的哈希函数。 (继承自 Object。)
公共方法 GetService(Guid) 检索使用已指定的服务GUID的服务。 (继承自 ServiceProvider。)
公共方法 GetService(Type) 检索具有指定类型的服务。 (继承自 ServiceProvider。)
受保护的方法 GetServiceImpl(Guid) 为检索服务提供该实现以特定GUID。 (继承自 ServiceProvider。)
受保护的方法 GetServiceImpl(Type) 检索实现服务的操作。 (重写 DataConnectionSupport.GetServiceImpl(Type)。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 Initialize 使用一个指定的提供程序,初始化指定的 ADO.NET 连接。 (重写 DataConnectionSupport.Initialize(Object)。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
受保护的方法 OnSiteChanged 引发 SiteChanged 事件。 (继承自 ServiceProviderWithSite。)
公共方法 Open 打开指定的数据连接。 (重写 DataConnectionSupport.Open(Boolean)。)
公共方法 Prepare 准备在数据源中指定的命令执行;命令可执行多次,使用不同的参数。
受保护的方法 RaiseMessageReceived 引发可在封闭 DataConnection 实例的 MessageReceived事件。 (继承自 DataConnectionSupport。)
受保护的方法 RaiseStateChanged 引发可在封闭 DataConnection 实例的状态更改事件。 (继承自 DataConnectionSupport。)
公共方法 RollbackTransaction 劳斯返回或无效,事务并返回新的当前事务级别。
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

事件

  名称 说明
公共事件 SiteChanged 引发的事件,请 Site 属性已更改。 (继承自 ServiceProviderWithSite。)

页首

显式接口实现

  名称 说明
显式接口实现私有方法 IObjectWithSite.GetSite 检索使用 IObjectWithSite.SetSite 方法设置的最后一个站点。如果没有已知的网站,将引发异常。 (继承自 ServiceProviderWithSite。)
显式接口实现私有方法 IServiceProvider.QueryService 执行为通过IServiceProvider的实现中显示的服务的一个工厂。 (继承自 ServiceProvider。)
显式接口实现私有方法 IObjectWithSite.SetSite 提供网站的 IUnknown 指向特定对象。 (继承自 ServiceProviderWithSite。)

页首

备注

此选件类提供默认情况下为 ADO.NET 数据提供程序创建的一个完整,托管实现。

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.VisualStudio.Data.AdoDotNet 命名空间