执行指定的命令并返回只读的结果。
命名空间: Microsoft.VisualStudio.Data.Framework
程序集: Microsoft.VisualStudio.Data.Framework(在 Microsoft.VisualStudio.Data.Framework.dll 中)
语法
声明
Public Function Execute ( _
command As String, _
commandType As DataCommandType _
) As IVsDataReader
public IVsDataReader Execute(
string command,
DataCommandType commandType
)
public:
virtual IVsDataReader^ Execute(
String^ command,
DataCommandType commandType
) sealed
abstract Execute :
command:string *
commandType:DataCommandType -> IVsDataReader
override Execute :
command:string *
commandType:DataCommandType -> IVsDataReader
public final function Execute(
command : String,
commandType : DataCommandType
) : IVsDataReader
参数
command
类型:String特定于数据源的命令执行。
commandType
类型:Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType解释如何指定 command 参数的命令内容的类型。 命令类型可以是 DataCommandType 枚举中的一个值或提供程序定义的自定义命令类型,可以通过强制从整数的一个转换将为 DataCommandType 枚举。
返回值
类型:Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
IVsDataReader 对象,从数据源提供的仅,只读的流。
实现
IVsDataCommand.Execute(String, DataCommandType)
异常
异常 | 条件 |
---|---|
ArgumentNullException | command 参数为 nullnull 引用(在 Visual Basic 中为 Nothing)。 |
备注
备注
发生的任何其他异常指示执行使用一个提供程序指定的原因失败。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。