Export (0) Print
Expand All

SqlNotificationRequest.SqlNotificationRequest(String, String, Int32) Constructor

Creates a new instance of the SqlNotificationRequest class with a user-defined string that identifies a particular notification request, the name of a predefined SQL Server 2005 Service Broker service name, and the time-out period, measured in seconds.

Namespace: System.Data.Sql
Assembly: System.Data (in system.data.dll)

public SqlNotificationRequest (
	string userData,
	string options,
	int timeout
)
public SqlNotificationRequest (
	String userData, 
	String options, 
	int timeout
)
public function SqlNotificationRequest (
	userData : String, 
	options : String, 
	timeout : int
)
Not applicable.

Parameters

userData

A string that contains an application-specific identifier for this notification. It is not used by the notifications infrastructure, but it allows you to associate notifications with the application state. The value indicated in this parameter is included in the Service Broker queue message.

options

A string that contains the Service Broker service name where notification messages are posted, and it must include a database name or a Service Broker instance GUID that restricts the scope of the service name lookup to a particular database.

For more information about the format of the options parameter, see Options.

timeout

The time, in seconds, to wait for a notification message.

Exception typeCondition

ArgumentNullException

The value of the options parameter is NULL.

ArgumentException

The options or userData parameter is longer than uint16.MaxValue.

ArgumentOutOfRangeException

The value in the timeout parameter is less than zero.

This constructor allows you to initialize a new SqlNotificationRequest instance, providing your own identifier, the SQL Server 2005 Service Broker service name, and a time-out value.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft