SqlCacheDependencyAdmin.GetTablesEnabledForNotifications Method
.NET Framework 3.0
Retrieves a string array containing the name of every table that is enabled for change notifications in a SQL Server database.
Namespace: System.Web.Caching
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
public: static array<String^>^ GetTablesEnabledForNotifications ( String^ connectionString )
public static String[] GetTablesEnabledForNotifications ( String connectionString )
public static function GetTablesEnabledForNotifications ( connectionString : String ) : String[]
Not applicable.
Parameters
- connectionString
A connection string used to connect to the SQL Server database.
Return Value
A string array that contains the names of the SQL Server database tables.| Exception type | Condition |
|---|---|
| The database is not enabled for change notifications | |
| 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.
Community Additions
ADD
Show: