The exception that is generated when a warning or error is returned by an Oracle database or the .NET Framework Data Provider for Oracle. This class cannot be inherited.
Assembly: System.Data.OracleClient (in System.Data.OracleClient.dll)
Gets the code portion of the error as an integer.
Gets a collection of key/value pairs that provide additional user-defined information about the exception.(Inherited from Exception.)
Gets the HRESULT of the error.(Inherited from ExternalException.)
Gets or sets a link to the help file associated with this exception.(Inherited from Exception.)
Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.(Inherited from Exception.)
Gets a message that describes the current exception.(Inherited from Exception.)
Gets or sets the name of the application or the object that causes the error.(Inherited from Exception.)
Gets a string representation of the immediate frames on the call stack.(Inherited from Exception.)
Gets the method that throws the current exception.(Inherited from Exception.)
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Sets the SerializationInfo with information about the exception.(Overrides Exception.GetObjectData(SerializationInfo, StreamingContext).)
Gets the runtime type of the current instance.(Inherited from Exception.)
Returns a string that contains the HRESULT of the error.(Inherited from ExternalException.)
The following example generates andue to a missing database, and then displays the exception.
Public Sub ShowOracleException() Dim myConnection As OracleConnection = _ New OracleConnection("Data Source=Oracle8i;Integrated Security=yes") Try myConnection.Open() Catch e As OracleException Dim errorMessage As String = "Code: " & e.Code & vbCrLf & _ "Message: " & e.Message Dim log As System.Diagnostics.EventLog = New System.Diagnostics.EventLog() log.Source = "My Application" log.WriteEntry(errorMessage) Console.WriteLine("An exception occurred. Please contact your system administrator.") End Try End Sub
Available since 1.1
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.