SqlPipe.SendResultsEnd メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SqlPipe.SendResultsEnd メソッドの意味・解説 

SqlPipe.SendResultsEnd メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

結果セット最後に到達したことを示し、SqlPipe インスタンス初期状態戻します

名前空間: Microsoft.SqlServer.Server
アセンブリ: System.Data (system.data.dll 内)
構文構文

Public Sub SendResultsEnd
Dim instance As SqlPipe

instance.SendResultsEnd
public void SendResultsEnd ()
public:
void SendResultsEnd ()
public void SendResultsEnd ()
public function SendResultsEnd ()
例外例外
例外種類条件

InvalidOperationException

SendResultsStart メソッドがまだ呼び出されていません。

解説解説
使用例使用例

次の例では、新しい SqlDataRecord と、その SqlMetaData オブジェクト作成します。さらに、SendResultsStart メソッド結果セット先頭宣言しサンプルデータを含むレコードを、SendResultsRow メソッドクライアント返した後、結果セット最後に到達したことを、SendResultsEnd メソッド使って示してます。

<Microsoft.SqlServer.Server.SqlProcedure()> _
Public Shared Sub StoredProcReturnResultSet()

    ' Create the record and specify the metadata for the columns.
    Dim record As New SqlDataRecord(
 _
        New SqlMetaData("col1",
 SqlDbType.NVarChar, 100), _
        New SqlMetaData("col2",
 SqlDbType.Int))

    ' Mark the begining of the result-set.
    SqlContext.Pipe.SendResultsStart(record)

    ' Send 10 rows back to the client.
    Dim i As Integer
    For i = 0 To 9

        ' Set values for each column in the row.
        record.SetString(0, "row " & i.ToString())
        record.SetInt32(1, i)

        ' Send the row back to the client.
        SqlContext.Pipe.SendResultsRow(record)
    Next

    ' Mark the end of the result-set.
    SqlContext.Pipe.SendResultsEnd()
End Sub
[Microsoft.SqlServer.Server.SqlProcedure]
public static void StoredProcReturnResultSet()
{
    // Create the record and specify the metadata for the columns.
    SqlDataRecord record = new SqlDataRecord(
        new SqlMetaData("col1", SqlDbType.NVarChar,
 100),
        new SqlMetaData("col2", SqlDbType.Int));

    // Mark the begining of the result-set.
    SqlContext.Pipe.SendResultsStart(record);

    // Send 10 rows back to the client.
    for (int i = 0; i < 10; i++)
    {
        // Set values for each column in the row.
        record.SetString(0, "row " + i.ToString());
        record.SetInt32(1, i);

        // Send the row back to the client.
        SqlContext.Pipe.SendResultsRow(record);
    }

    // Mark the end of the result-set.
    SqlContext.Pipe.SendResultsEnd();
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlPipe クラス
SqlPipe メンバ
Microsoft.SqlServer.Server 名前空間
SendResultsRow
SendResultsStart



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

SqlPipe.SendResultsEnd メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SqlPipe.SendResultsEnd メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS