DbCommand 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示要对数据源执行的 SQL 语句或存储过程。 提供表示命令的数据库特定类的基类。 ExecuteNonQueryAsync.
public ref class DbCommand abstract : IDisposable
public ref class DbCommand abstract : System::ComponentModel::Component, IAsyncDisposable, IDisposable, System::Data::IDbCommand
public ref class DbCommand abstract : IDisposable, System::Data::IDbCommand
public ref class DbCommand abstract : System::ComponentModel::Component, IDisposable, System::Data::IDbCommand
public ref class DbCommand abstract : System::ComponentModel::Component, System::Data::IDbCommand
public ref class DbCommand abstract : System::ComponentModel::Component, IAsyncDisposable, System::Data::IDbCommand
public abstract class DbCommand : IDisposable
public abstract class DbCommand : System.ComponentModel.Component, IAsyncDisposable, IDisposable, System.Data.IDbCommand
public abstract class DbCommand : IDisposable, System.Data.IDbCommand
public abstract class DbCommand : System.ComponentModel.Component, IDisposable, System.Data.IDbCommand
public abstract class DbCommand : System.ComponentModel.Component, System.Data.IDbCommand
public abstract class DbCommand : System.ComponentModel.Component, IAsyncDisposable, System.Data.IDbCommand
type DbCommand = class
interface IDisposable
type DbCommand = class
inherit Component
interface IDbCommand
interface IDisposable
interface IAsyncDisposable
type DbCommand = class
interface IDbCommand
interface IDisposable
type DbCommand = class
inherit Component
interface IDbCommand
interface IDisposable
Public MustInherit Class DbCommand
Implements IDisposable
Public MustInherit Class DbCommand
Inherits Component
Implements IAsyncDisposable, IDbCommand, IDisposable
Public MustInherit Class DbCommand
Implements IDbCommand, IDisposable
Public MustInherit Class DbCommand
Inherits Component
Implements IDbCommand, IDisposable
Public MustInherit Class DbCommand
Inherits Component
Implements IDbCommand
Public MustInherit Class DbCommand
Inherits Component
Implements IAsyncDisposable, IDbCommand
- 继承
-
DbCommand
- 继承
- 派生
- 实现
构造函数
DbCommand() |
构造 DbCommand 对象的实例。 |
属性
CanRaiseEvents |
获取一个指示组件是否可以引发事件的值。 (继承自 Component) |
CommandText |
获取或设置对数据源运行的文本命令。 |
CommandTimeout |
获取或设置在终止尝试执行命令并生成错误的) (等待时间(以秒为单位)。 |
CommandType |
获取或设置属性的解释方式 CommandText 。 |
Connection |
获取或设置此 DbConnection 使用的 DbCommand。 |
Container |
获取包含 IContainer 的 Component。 (继承自 Component) |
DbConnection |
获取或设置此 DbConnection 使用的 DbCommand。 |
DbParameterCollection |
获取 DbParameter 对象的集合。 |
DbTransaction |
获取或设置将在其中执行此 DbCommand 对象的 DbTransaction。 |
DesignMode |
获取一个值,用以指示 Component 当前是否处于设计模式。 (继承自 Component) |
DesignTimeVisible |
获取或设置一个值,该值指示此命令对象在自定义界面控件中是否可见。 |
Events |
获取附加到此 Component 的事件处理程序的列表。 (继承自 Component) |
Parameters |
获取 DbParameter 对象的集合。 有关参数的详细信息,请参阅配置参数和参数数据类型。 |
Site | (继承自 Component) |
Transaction |
获取或设置将在其中执行此 DbCommand 对象的 DbTransaction。 |
UpdatedRowSource |
获取或设置命令结果在由 DataRow 的 Update 方法使用时如何应用于 DbDataAdapter。 |
方法
事件
Disposed |
在通过调用 Dispose() 方法释放组件时发生。 (继承自 Component) |
显式接口实现
IDbCommand.Connection |
获取或设置 IDbCommand 的此实例使用的 IDbConnection。 |
IDbCommand.CreateParameter() |
创建 IDbDataParameter 对象的新实例。 |
IDbCommand.ExecuteReader() |
对 Connection 执行 CommandText 并生成 IDataReader。 |
IDbCommand.ExecuteReader(CommandBehavior) |
对 Connection 执行 CommandText,并使用 CommandBehavior 值之一生成 IDataReader。 |
IDbCommand.Parameters | |
IDbCommand.Transaction |
获取或设置将在其中执行此 DbCommand 对象的 DbTransaction。 |
扩展方法
ConfigureAwait(IAsyncDisposable, Boolean) |
配置如何执行从异步可处置项返回的任务的等待。 |