DatabaseNotEnabledForNotificationException Klasse
Definition
Die Ausnahme, die ausgelöst wird, wenn eine SQL Server-Datenbank nicht für die Unterstützung von Abhängigkeiten aktiviert ist, die der SqlCacheDependency-Klasse zugeordnet sind.The exception that is thrown when a SQL Server database is not enabled to support dependencies associated with the SqlCacheDependency class. Diese Klasse kann nicht vererbt werden.This class cannot be inherited.
public ref class DatabaseNotEnabledForNotificationException sealed : SystemException
[System.Serializable]
public sealed class DatabaseNotEnabledForNotificationException : SystemException
[<System.Serializable>]
type DatabaseNotEnabledForNotificationException = class
inherit SystemException
Public NotInheritable Class DatabaseNotEnabledForNotificationException
Inherits SystemException
- Vererbung
- Attribute
Beispiele
Das folgende Codebeispiel ist ein Ausnahmehandler für eine einfache Verwaltungsseite zum Einrichten von Änderungs Benachrichtigungen in einer SQL Server-Datenbank.The following code example is an exception handler for a simple administration page for setting up change notification in a SQL Server database.
Den vollständigen Code, der zum Ausführen des Beispiels erforderlich ist, finden Sie im Beispiel Abschnitt des SqlCacheDependencyAdmin Themas class Overview.For the full code required to run the example, see the Example section of the SqlCacheDependencyAdmin class overview topic.
catch (DatabaseNotEnabledForNotificationException ex)
{
enabledTables.Visible = false;
disableTable.Visible = false;
enabledTablesMsg.Text = "Cache notifications are not enabled in this database.";
tableName.Visible = false;
enableTable.Visible = false;
tableEnableMsg.Text = "Must enable database for notifications before enabling tables";
}
Catch ex As DatabaseNotEnabledForNotificationException
enabledTables.Visible = False
disableTable.Visible = False
enabledTablesMsg.Text = "Cache notifications are not enabled in this database."
tableName.Visible = False
enableTable.Visible = False
tableEnableMsg.Text = "Must enable database for notifications before enabling tables."
End Try
Konstruktoren
DatabaseNotEnabledForNotificationException() |
Initialisiert eine neue Instanz der DatabaseNotEnabledForNotificationException-Klasse.Initializes a new instance of the DatabaseNotEnabledForNotificationException class. |
DatabaseNotEnabledForNotificationException(String) |
Initialisiert eine neue Instanz der DatabaseNotEnabledForNotificationException-Klasse.Initializes a new instance of the DatabaseNotEnabledForNotificationException class. |
DatabaseNotEnabledForNotificationException(String, Exception) |
Initialisiert eine neue Instanz der DatabaseNotEnabledForNotificationException-Klasse mit einer angegebenen Fehlermeldung und einem Verweis auf die innere Ausnahme, die diese Ausnahme ausgelöst hat.Initializes a new instance of the DatabaseNotEnabledForNotificationException class with a specified error message and a reference to the inner exception that is the cause of this exception. |
Eigenschaften
Data |
Ruft eine Auflistung von Schlüssel-Wert-Paaren ab, die zusätzliche benutzerdefinierte Informationen zur Ausnahme bereitstellen.Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Geerbt von Exception) |
HelpLink |
Ruft einen Link zur Hilfedatei ab, die dieser Ausnahme zugeordnet ist, oder legt einen Link fest.Gets or sets a link to the help file associated with this exception. (Geerbt von Exception) |
HResult |
Ruft HRESULT ab oder legt HRESULT fest. Dies ist ein codierter Wert, der einer bestimmten Ausnahme zugeordnet ist.Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Geerbt von Exception) |
InnerException |
Ruft die Exception-Instanz ab, die die aktuelle Ausnahme verursacht hat.Gets the Exception instance that caused the current exception. (Geerbt von Exception) |
Message |
Ruft eine Meldung ab, mit der die aktuelle Ausnahme beschrieben wird.Gets a message that describes the current exception. (Geerbt von Exception) |
Source |
Gibt den Namen der Anwendung oder des Objekts zurück, die bzw. das den Fehler verursacht hat, oder legt diesen fest.Gets or sets the name of the application or the object that causes the error. (Geerbt von Exception) |
StackTrace |
Ruft eine Zeichenfolgendarstellung der unmittelbaren Frames in der Aufrufliste ab.Gets a string representation of the immediate frames on the call stack. (Geerbt von Exception) |
TargetSite |
Ruft die Methode ab, die die aktuelle Ausnahme auslöst.Gets the method that throws the current exception. (Geerbt von Exception) |
Methoden
Equals(Object) |
Bestimmt, ob das angegebene Objekt mit dem aktuellen Objekt identisch ist.Determines whether the specified object is equal to the current object. (Geerbt von Object) |
GetBaseException() |
Gibt beim Überschreiben in einer abgeleiteten Klasse eine Exception zurück, die die Grundursache für eine oder mehrere nachfolgende Ausnahmen ist.When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Geerbt von Exception) |
GetHashCode() |
Fungiert als Standardhashfunktion.Serves as the default hash function. (Geerbt von Object) |
GetObjectData(SerializationInfo, StreamingContext) |
Legt beim Überschreiben in einer abgeleiteten Klasse die SerializationInfo mit Informationen über die Ausnahme fest.When overridden in a derived class, sets the SerializationInfo with information about the exception. (Geerbt von Exception) |
GetType() |
Ruft den Laufzeittyp der aktuellen Instanz ab.Gets the runtime type of the current instance. (Geerbt von Exception) |
MemberwiseClone() |
Erstellt eine flache Kopie des aktuellen Object.Creates a shallow copy of the current Object. (Geerbt von Object) |
ToString() |
Erstellt eine Zeichenfolgendarstellung der aktuellen Ausnahme und gibt diese zurück.Creates and returns a string representation of the current exception. (Geerbt von Exception) |
Ereignisse
SerializeObjectState |
Tritt auf, wenn eine Ausnahme serialisiert wird, um ein Ausnahmezustandsobjekt mit serialisierten Daten über die Ausnahme zu erstellen.Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Geerbt von Exception) |