Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

Part Number B10118-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

LastServerErr Property

See Also
Example
Applies To

OraDatabase

OraSession

Description

Returns the last nonzero error code generated by an Oracle database function for the specified object. Not available at design time and read-only at run time.

Usage

error_number = oradatabase.LastServerErr

error_number = orasession.LastServerErr

Remarks

This property represents the last nonzero return value from an Oracle Call Interface (OCI) database function, or 0 if no error has occurred since the last LastServerErrReset request. For efficiency, only nonzero return values are returned; therefore, a nonzero value does not necessarily indicate that the most recently called OCI database function generated the error (because zero return values are not returned by way of LastServerErr).

Orasession.LastServerErr returns all errors related to connections, such as errors on OpenDatabase, BeginTrans, CommitTrans, Rollback and ResetTrans.

Oradatabase.LastServerErr returns all errors related to an Oracle cursor, such as errors on dynasets and from ExecuteSQL.

Data Type

Long Integer