SqlCacheDependencyAdmin::GetTablesEnabledForNotifications Method
Retrieves a string array containing the name of every table that is enabled for change notifications in a SQL Server database.
Assembly: System.Web (in System.Web.dll)
public: static array<String^>^ GetTablesEnabledForNotifications( String^ connectionString )
Parameters
- connectionString
- Type: System::String
A connection string used to connect to the SQL Server database.
Return Value
Type: array<System::String>A string array that contains the names of the SQL Server database tables.
| Exception | Condition |
|---|---|
| DatabaseNotEnabledForNotificationException | The database is not enabled for change notifications |
| 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 following code example creates a string array of the tables enabled for change notifications in the database 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.
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.