SqlCacheDependencyAdmin.EnableNotifications メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SqlCacheDependencyAdmin.EnableNotifications メソッドの意味・解説 

SqlCacheDependencyAdmin.EnableNotifications メソッド

メモ : このメソッドは、.NET Framework version 2.0 で新しく追加されたものです。

指定されているデータベースの SqlCacheDependency 変更通知を有効にします。

名前空間: System.Web.Caching
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Shared Sub EnableNotifications
 ( _
    connectionString As String _
)
Dim connectionString As String

SqlCacheDependencyAdmin.EnableNotifications(connectionString)
public static void EnableNotifications
 (
    string connectionString
)
public:
static void EnableNotifications (
    String^ connectionString
)
public static void EnableNotifications
 (
    String connectionString
)
public static function EnableNotifications
 (
    connectionString : String
)

パラメータ

connectionString

SQL Server データベースに接続するときに使用する接続文字列。

例外例外
解説解説

EnableNotifications メソッドは、connectionString パラメータで指定されているデータベースの変更通知のサポートを有効にします。EnableNotifications メソッドを実行した後で、データベースの変更通知を無効にする場合は、DisableNotifications メソッドを実行する必要があります。

使用例使用例

EnableNotifications メソッドを使用して、接続文字列 MyConnectionString で指定されているデータベースの変更通知を有効にするコード例を次に示します。

例の実行に必要なコード全体については、SqlCacheDependencyAdmin クラスの概要のトピックで「例」を参照してください。

Protected Sub enableNotification_Click(ByVal
 sender As Object, ByVal
 e As System.EventArgs)
  SqlCacheDependencyAdmin.EnableNotifications( _
      ConfigurationManager.ConnectionStrings("MyConnectionString").ConnectionString)
End Sub
protected void enableNotification_Click(object
 sender, EventArgs e)
{
  SqlCacheDependencyAdmin.EnableNotifications(
    ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlCacheDependencyAdmin クラス
SqlCacheDependencyAdmin メンバ
System.Web.Caching 名前空間



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「SqlCacheDependencyAdmin.EnableNotifications メソッド」の関連用語

SqlCacheDependencyAdmin.EnableNotifications メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SqlCacheDependencyAdmin.EnableNotifications メソッドのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS