SqlCacheDependencyAdmin.DisableTableForNotifications Method (String, String)
Assembly: System.Web (in system.web.dll)
public: static void DisableTableForNotifications ( String^ connectionString, String^ table )
public static void DisableTableForNotifications ( String connectionString, String table )
public static function DisableTableForNotifications ( connectionString : String, table : String )
Not applicable.
Parameters
- connectionString
A connection string used to connect to the SQL Server database.
- table
The database table on which to disable change notifications.
| Exception type | Condition |
|---|---|
|
The database is not enabled for change notifications. | |
|
table is an empty string (""). | |
|
table is a null reference (Nothing in Visual Basic). | |
|
A connection to the database could not be established. -or- The security context of the ASP.NET application does not have permission to connect to the database. -or- The security context of the ASP.NET application does not have permission to disable notifications for the database. |
The DisableTableForNotifications method disables change notifications for the table specified in the table parameter, which must be in the database specified in the connectionString parameter.
Once you have used the DisableTableForNotifications method to disable change notifications for a table, you must use one of the EnableTableForNotifications overloads if you wish to re-enable change notifications.
The following code example disables change notification on a table specified in the connection string MyConnectionString.
For the full code required to run the example, see the Example section of the SqlCacheDependencyAdmin class overview topic.