SqlCommand.EndExecuteXmlReader(IAsyncResult) メソッド

定義

Transact-SQL ステートメントの非同期実行を完了し、要求されたデータを XML として返します。

public:
 System::Xml::XmlReader ^ EndExecuteXmlReader(IAsyncResult ^ asyncResult);
public System.Xml.XmlReader EndExecuteXmlReader (IAsyncResult asyncResult);
member this.EndExecuteXmlReader : IAsyncResult -> System.Xml.XmlReader
Public Function EndExecuteXmlReader (asyncResult As IAsyncResult) As XmlReader

パラメーター

asyncResult
IAsyncResult

BeginExecuteXmlReader() への呼び出しで返される IAsyncResult

戻り値

結果の XML データをフェッチするときに使用できる XmlReader オブジェクト。

例外

asyncResult パラメーターは null です (Microsoft Visual Basic では Nothing です)。

EndExecuteXmlReader(IAsyncResult) が 1 回のコマンドの実行に対して複数回呼び出されました。または、メソッドが実行メソッドに対して一致しませんでした (たとえば、BeginExecuteNonQuery() に対する呼び出しを実行するためにコードが EndExecuteXmlReader(IAsyncResult) を呼び出しました)。

メソッドの使用 EndExecuteXmlReader 例については、「」を参照してください BeginExecuteXmlReader

注釈

を呼び出 BeginExecuteXmlReader して Transact-SQL ステートメントを実行する場合は、 を呼び出 EndExecuteXmlReader して操作を完了する必要があります。 コマンドを実行するプロセスがまだ完了していない場合、このメソッドは操作が完了するまでブロックします。 ユーザーは、 メソッドによって返されるインスタンスを使用して、コマンドが操作をIAsyncResultBeginExecuteXmlReader完了したことを確認できます。 への呼び出しでコールバック プロシージャが指定されている場合は、このメソッドを BeginExecuteXmlReader呼び出す必要があります。

適用対象

こちらもご覧ください