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

適用対象

こちらもご覧ください