DataCommand.Prepare メソッド

実装されるデータ ソースで指定されたコマンドを準備します; コマンドは、複数回さまざまなパラメーター、実行される場合があります。

名前空間:  Microsoft.VisualStudio.Data
アセンブリ:  Microsoft.VisualStudio.Data (Microsoft.VisualStudio.Data.dll 内)

構文

'宣言
Public Overridable Function Prepare ( _
    command As String, _
    commandType As Integer, _
    commandTimeout As Integer _
) As String
public virtual string Prepare(
    string command,
    int commandType,
    int commandTimeout
)
public:
virtual String^ Prepare(
    String^ command, 
    int commandType, 
    int commandTimeout
)
abstract Prepare : 
        command:string * 
        commandType:int * 
        commandTimeout:int -> string 
override Prepare : 
        command:string * 
        commandType:int * 
        commandTimeout:int -> string 
public function Prepare(
    command : String, 
    commandType : int, 
    commandTimeout : int
) : String

パラメーター

  • command
    型 : System.String
    実装するデータ ソースに固有のコマンド。
  • commandType
    型 : System.Int32
    指定する名前付きコマンドのコマンドの型 command のパラメーターの内容を解釈する方法を示します。
  • commandTimeout
    型 : System.Int32
    実行をキャンセルし、呼び出し元に戻す前にクライアントをブロック時間 (秒)。0 という値は無限タイムアウトを示しています; 値 -1 は、プロバイダーの既定値を表示します。

戻り値

型 : System.String
コマンドの種類 Preparedを使用して ExecuteExecuteWithoutResults のメソッドに渡すことができる準備したコマンドの識別子を返します。

例外

例外 条件
ArgumentNullException

コマンドまたは asyncCommandEvents が null です。

ArgumentException

commandType は無効な型を指定します。

ArgumentOutOfRangeException

commandTimeout は -1 未満です。

NotSupportedException

プロバイダーはこのメソッドをサポートしません。

解説

パラメーターは、ほかの例外の派生がプロバイダー指定された理由で失敗したことを示します。

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

関連項目

DataCommand クラス

Microsoft.VisualStudio.Data 名前空間

DataCommand