PsqlException Object
Show this topic in Library frames
The PsqlException object is created and thrown when the Pervasive.SQL server returns an error. Exceptions generated by the data provider itself are returned as standard run time exceptions.
The properties described in Table 4-15 apply to the last error generated, if multiple errors exist. The application should check the Count property of the PsqlErrorCollection returned in the Errors property of this object to determine whether multiple errors occurred. See PsqlErrorCollection Object for more information.
Table 4-15 Public Properties of the PsqlException Object
|
Property
|
Description
|
|
Errors
|
Gets or sets a PsqlErrorCollection of one of more PsqlError objects.
|
|
Message
|
Specifies the error message text that is returned from the Pervasive.SQL server.
|
|
Number
|
Gets or sets the number returned from the Pervasive.SQL server.
|
|
SQLState
|
Returns the string representation of the SQLState when an exception is thrown by the Pervasive.SQL data provider, or 0 if the exception is not applicable to the error. This property is read-only.
|
Table 4-16 describes the public methods for PsqlException.
Table 4-16 Public Methods of the PsqlException Object
|
Methods
|
Description
|
|
GetBaseException
|
When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
|
|
GetObjectData
|
When overridden in a derived class, sets the SerializationInfo with information about the exception.
|
|
ToString
|
Overridden. Creates and returns a string representation of the current exception.
|