Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SqlNotificationRequest.Options Property

Gets or sets the SQL Server Service Broker service name where notification messages are posted.

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

public string Options { get; set; }

Property Value

Type: System.String
string that contains the SQL Server 2005 Service Broker service name where notification messages are posted and the database or service broker instance GUID to scope the server name lookup.

ExceptionCondition
ArgumentNullException

The value is NULL.

ArgumentException

The value is longer than uint16.MaxValue.

The value of the Options property has the following format:

service=<service-name>{;(local database=<database>|broker instance=<broker instance>)}

For example, if you use the service "myservice" in the database "AdventureWorks" the format is:

service=myservice;local database=AdventureWorks

The SQL Server Service Broker service must be previously configured on the server. In addition, a Service Broker service and queue must be defined and security access granted as needed. See the SQL Server 2005 documentation for more information.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft