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

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

SqlPipe.SendResultsRow メソッド

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

単一行のデータクライアント返します

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

Public Sub SendResultsRow ( _
    record As SqlDataRecord _
)
Dim instance As SqlPipe
Dim record As SqlDataRecord

instance.SendResultsRow(record)
public void SendResultsRow (
    SqlDataRecord record
)
public:
void SendResultsRow (
    SqlDataRecord^ record
)
public void SendResultsRow (
    SqlDataRecord record
)
public function SendResultsRow (
    record : SqlDataRecord
)

パラメータ

record

クライアント送信する行の列値を含む SqlDataRecord オブジェクト。このレコードスキーマは、SendResultsStart メソッド渡した SqlDataRecordメタデータ定義するスキーマ一致している必要があります

例外例外
例外種類条件

ArgumentNullException

recordnull 参照 (Visual Basic では Nothing) です。

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 名前空間
SendResultsStart
SendResultsEnd



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2024 GRAS Group, Inc.RSS