SqlCacheDependencyAdmin::DisableTableForNotifications Method (String, array<String>)
Disables SqlCacheDependency change notifications on an array of SQL Server database tables.
Assembly: System.Web (in System.Web.dll)
public: static void DisableTableForNotifications( String^ connectionString, array<String^>^ tables )
Parameters
- connectionString
- Type: System::String
A connection string used to connect to the SQL Server database.
- tables
- Type: array<System::String>
The array of SQL Server database tables on which to disable change notifications.
| Exception | Condition |
|---|---|
| DatabaseNotEnabledForNotificationException | The database is not enabled for change notifications. |
| ArgumentException | One of the values in the tables parameter is nullptr. -or- One of the values in the tables parameter is an empty string (""). |
| ArgumentNullException | tables is nullptr. |
| HttpException | 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 removes change notifications from the tables specified in the tables parameter. These tables must be in the database specified in the connectionString parameter.
Once you have used the DisableTableForNotifications method to disable change notifications for a list of tables, you must use one of the EnableTableForNotifications overloads if you wish to re-enable change notifications.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.