次の方法で共有


SqlNotificationRequest コンストラクター

定義

SqlNotificationRequest クラスの新しいインスタンスを作成します。

オーバーロード

名前 説明
SqlNotificationRequest()

既定値を使用して、 SqlNotificationRequest クラスの新しいインスタンスを作成します。

SqlNotificationRequest(String, String, Int32)

特定の通知要求、定義済みの SQL Server 2005 Service Broker サービス名の名前、タイムアウト期間を秒単位で識別するユーザー定義文字列を使用して、 SqlNotificationRequest クラスの新しいインスタンスを作成します。

SqlNotificationRequest()

ソース:
System.Data.SqlClient.notsupported.cs

既定値を使用して、 SqlNotificationRequest クラスの新しいインスタンスを作成します。

public:
 SqlNotificationRequest();
public SqlNotificationRequest();
Public Sub New ()

注釈

パラメーターなしのコンストラクターを使用してSqlNotificationRequest オブジェクトを作成する場合、そのインスタンスは、SqlCommand オブジェクトのNotification プロパティにオブジェクトを割り当てる前に、そのUserDataプロパティとOptionsプロパティを初期化する必要があります。 コンストラクターで使用される既定値は、UserDataの場合は NULL (Visual Basic ではNothing)、Optionsの場合は空の文字列、Timeoutの場合は 0 です。

こちらもご覧ください

適用対象

SqlNotificationRequest(String, String, Int32)

ソース:
System.Data.SqlClient.notsupported.cs

特定の通知要求、定義済みの SQL Server 2005 Service Broker サービス名の名前、タイムアウト期間を秒単位で識別するユーザー定義文字列を使用して、 SqlNotificationRequest クラスの新しいインスタンスを作成します。

public:
 SqlNotificationRequest(System::String ^ userData, System::String ^ options, int timeout);
public SqlNotificationRequest(string userData, string options, int timeout);
new System.Data.Sql.SqlNotificationRequest : string * string * int -> System.Data.Sql.SqlNotificationRequest
Public Sub New (userData As String, options As String, timeout As Integer)

パラメーター

userData
String

この通知のアプリケーション固有の識別子を含む文字列。 通知インフラストラクチャでは使用されませんが、通知をアプリケーションの状態に関連付けることができます。 このパラメーターに示されている値は、Service Broker キュー メッセージに含まれます。

options
String

通知メッセージが投稿される Service Broker サービス名を含む文字列。サービス名参照のスコープを特定のデータベースに制限するデータベース名または Service Broker インスタンス GUID を含める必要があります。

options パラメーターの形式の詳細については、Optionsを参照してください。

timeout
Int32

通知メッセージを待機する時間 (秒単位)。

例外

options パラメーターの値は NULL です。

optionsまたはuserDataパラメーターがuint16.MaxValueより長いか、timeout パラメーターの値が 0 未満です。

注釈

このコンストラクターを使用すると、独自の識別子、SQL Server 2005 Service Broker サービス名、タイムアウト値を指定して、新しい SqlNotificationRequest インスタンスを初期化できます。

こちらもご覧ください

適用対象