DataCommand.ExecuteWithoutResults 方法 (String, DataCommandType, array<IVsDataParameter[], Int32)
執行命令,並選擇性地使用參數,但是,要求結果,反而會傳回呼叫的結果整數。
命名空間: Microsoft.VisualStudio.Data.Framework
組件: Microsoft.VisualStudio.Data.Framework (在 Microsoft.VisualStudio.Data.Framework.dll 中)
語法
'宣告
Public Overridable Function ExecuteWithoutResults ( _
command As String, _
commandType As DataCommandType, _
parameters As IVsDataParameter(), _
commandTimeout As Integer _
) As Integer
public virtual int ExecuteWithoutResults(
string command,
DataCommandType commandType,
IVsDataParameter[] parameters,
int commandTimeout
)
public:
virtual int ExecuteWithoutResults(
String^ command,
DataCommandType commandType,
array<IVsDataParameter^>^ parameters,
int commandTimeout
)
abstract ExecuteWithoutResults :
command:string *
commandType:DataCommandType *
parameters:IVsDataParameter[] *
commandTimeout:int -> int
override ExecuteWithoutResults :
command:string *
commandType:DataCommandType *
parameters:IVsDataParameter[] *
commandTimeout:int -> int
public function ExecuteWithoutResults(
command : String,
commandType : DataCommandType,
parameters : IVsDataParameter[],
commandTimeout : int
) : int
參數
command
類型:String要針對資料來源執行的命令。
commandType
類型:Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType指定如何解譯 command 參數的內容命令的型別。 命令型別可能是來自 DataCommandType 列舉的值或提供者所定義的自訂命令類型,可以強制從整數的轉型傳遞至 DataCommandType 列舉。
parameters
類型:array<Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[]陣列代表指定的命令類型之 IVsDataParameter 物件命令參數。
commandTimeout
類型:Int32時間,以秒為單位),在取消執行和傳回之前封鎖用戶端傳遞給呼叫端。 0 表示無限逾時的值;值為 -1 表示預設提供者。
傳回值
類型:Int32
DDEX 提供者特定整數狀態碼。
實作
IVsDataCommand.ExecuteWithoutResults(String, DataCommandType, array<IVsDataParameter[], Int32)
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | command 參數為 nullnull 參考 (即 Visual Basic 中的 Nothing)。 |
ArgumentOutOfRangeException | commandTimeout 參數小於 -1。 |
備註
在大部分情況下,呼叫的結果指派給這個方法會指示資料列數會受到影響。
您仍然可以啟動和傳回值參數使用此呼叫。 它們不會被視為一部分的結果。
注意事項 |
---|
發生表示執行的其他例外狀況為一個提供者指定的原因而失敗。 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。