SqlCeConnection 成员

表示到 SQL Server Compact 3.5 数据源的连接是打开的。

SqlCeConnection 类型公开以下成员。

构造函数

  名称 说明
公共方法 SqlCeConnection() () () () 初始化 SqlCeConnection 类的新实例。
公共方法 SqlCeConnection(String) 使用指定的连接字符串初始化 SqlCeConnection 类的新实例。

页首

方法

  名称 说明
受保护的方法 BeginDbTransaction (inherited from DbConnection)
公共方法 BeginTransaction() () () () 开始数据库事务。
公共方法 BeginTransaction(IsolationLevel) 以当前的 IsolationLevel 值开始数据库事务。
公共方法 ChangeDatabase 为打开的 SqlCeConnection 更改当前数据库。 (重写 DbConnection. . :: . .ChangeDatabase(String)。)
公共方法 Close 关闭到数据源的连接。这是关闭任何打开连接的首选方法。 (重写 DbConnection. . :: . .Close() () () ()。)
公共方法 CreateCommand 创建并返回一个与 SqlCeConnection 关联的 SqlCeCommand 对象。
受保护的方法 CreateDbCommand (inherited from DbConnection)
公共方法 CreateObjRef (inherited from MarshalByRefObject)
公共方法 Dispose() () () () 释放 SqlCeConnection 类的当前实例所使用的所有资源。
受保护的方法 Dispose (inherited from Component)
公共方法 EnlistTransaction (inherited from DbConnection)
公共方法 EnlistTransaction(Transaction) 登记指定的 Transaction
公共方法 Equals (inherited from Object)
受保护的方法 Finalize (inherited from Component)
公共方法 GetDatabaseInfo 返回一组键值对,包含关于已连接数据库的区域设置、加密模式和区分大小写设置的信息。
公共方法 GetHashCode (inherited from Object)
公共方法 GetLifetimeService (inherited from MarshalByRefObject)
公共方法 GetSchema (inherited from DbConnection)
公共方法 GetSchema (inherited from DbConnection)
公共方法 GetSchema (inherited from DbConnection)
受保护的方法 GetService (inherited from Component)
公共方法 GetType (inherited from Object)
公共方法 InitializeLifetimeService (inherited from MarshalByRefObject)
受保护的方法 MemberwiseClone (inherited from Object)
受保护的方法 MemberwiseClone (inherited from MarshalByRefObject)
受保护的方法 OnStateChange (inherited from DbConnection)
公共方法 Open 使用 ConnectionString 所指定的属性设置打开数据库连接。 (重写 DbConnection. . :: . .Open() () () ()。)
公共方法 ToString (inherited from Component)

页首

属性

  名称 说明
受保护的属性 CanRaiseEvents (inherited from Component)
公共属性 ConnectionString 获取或设置用于打开数据库的字符串。 (重写 DbConnection. . :: . .ConnectionString。)
公共属性 ConnectionTimeout 获取在终止尝试并生成错误之前等待并尝试建立连接的时间。 (重写 DbConnection. . :: . .ConnectionTimeout。)
公共属性 Container (inherited from Component)
公共属性 Database 获取当前数据库或在连接打开后要使用的数据库的名称。 (重写 DbConnection. . :: . .Database。)
公共属性 DatabaseIdentifier 同步时获取当前数据库的唯一标识符。
公共属性 DataSource 获取数据源的文件名。 (重写 DbConnection. . :: . .DataSource。)
受保护的属性 DbProviderFactory (inherited from DbConnection)
受保护的属性 DesignMode (inherited from Component)
受保护的属性 Events (inherited from Component)
公共属性 ServerVersion 以字符串形式返回数据库版本号。 (重写 DbConnection. . :: . .ServerVersion。)
公共属性 Site (inherited from Component)
公共属性 State 获取连接的当前状态。 (重写 DbConnection. . :: . .State。)

页首

事件

  名称 说明
公共事件 Disposed (inherited from Component)
公共事件 FlushFailure 当背景刷新失败时发生。
公共事件 InfoMessage 在 SQL Server 的 .NET Compact Framework 数据提供程序发送警告或信息性消息时发生。
公共事件 StateChange 已过时。当连接状态更改时发生。 (重写 DbConnection. . :: . .StateChange。)

页首

显式接口实现

  名称 说明
显式接口实现专用方法 IDbConnection. . :: . .BeginTransaction (inherited from DbConnection)
显式接口实现专用方法 IDbConnection. . :: . .BeginTransaction (inherited from DbConnection)
显式接口实现专用方法 IDbConnection. . :: . .CreateCommand (inherited from DbConnection)

页首

请参阅

参考

SqlCeConnection类

System.Data.SqlServerCe 命名空间