src/openSourceC.DotNetLibrary.Data.SqlClient/Data/SqlClient/SqlDbCommand.cs
/// <summary>
///		Register a <see cref="T:SqlDependency"/> using the current command object along with
///		the specified event handler, options, and timeout.
/// </summary>
/// <remarks>
///		The value of the <see cref="P:SqlNotificationRequest.Options"/> parameter has the
///		following format:
///
///		<code>service=&lt;service-name&gt;{;(local database=&lt;database&gt;|broker instance =&lt;broker instance&gt;)}</code>
///
///		For example, if you use the service "myservice" in the database "AdventureWorks" the
///		format is:
///
///		<code>service=myservice;local database = AdventureWorks</code>
///
///		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.
/// </remarks>
/// <param name="eventHandler">The event handler for the OnChange event.</param>
/// <param name="options">The notification request options to be used by this dependency.
///		<b>null</b> to use the default service.</param>
/// <param name="timeout">The time-out for this notification in seconds. The default is 0,
///		indicating that the server's time-out should be used.</param>
Register a  using the current command object along with
the specified event handler, options, and timeout.
Register a using the current command object along with the specified event handler options and timeout .
[SqlClientPermission(SecurityAction.Demand, Unrestricted = true)]
		public void RegisterDependency(OnChangeEventHandler eventHandler, string options, int timeout)
		{
			SqlDependency dependency = new SqlDependency(Command, options, timeout);
			dependency.OnChange += eventHandler;
		}
[ SqlClientPermission ( SecurityAction . Demand , Unrestricted = true ) ] public void RegisterDependency ( OnChangeEventHandler eventHandler , string options , int timeout ) { SqlDependency dependency = new SqlDependency ( Command , options , timeout ) ; dependency . OnChange += eventHandler ; }
Register a  using the current command object along with
the specified event handler, options, and timeout.
Register a using the current command object along with the specified event handler options and timeout .
eventHandler
OnChangeEventHandler
The event handler for the OnChange event.
The event handler for the OnChange event .
options
string
The notification request options to be used by this dependency.
null
The notification request options to be used by this dependency . null
timeout
int
The time-out for this notification in seconds. The default is 0,
indicating that the server's time-out should be used.
The time - out for this notification in seconds . The default is 0 indicating that the server ' s time - out should be used .
remarks
The value of the  parameter has the
following format.

service={;(local database=|broker instance =)}service=myservice;local database = AdventureWorks
The value of the parameter has the following format . service = { ; ( local database = |broker instance = ) } service = myservice ; local database = AdventureWorks