When your application calls an EDS command, EDS returns a predefined code. These return codes indicate success, warning, or failure status and may come from two different sources:
•From an EDS internal error
•From ODBC commands called by EDS
Like all ESL subroutines, EDS subroutines return error codes as errorlevel arguments. Likewise, EDS functions return error codes as return values.
EDS Internal Return Codes
The following table describes the return codes generated by EDS internal errors.
EDS Internal Return Code |
Description |
EDS_GENERAL_ERR |
A generic internal EDS error occurred. |
EDS_ALLOC_ERR |
Memory allocation error occurred. There was not enough remaining memory to continue. |
EDS_MAXHANDLES_ERR |
Maximum handles limit has been reached. Free any open, unneeded handles. |
EDS_VALID_ENTRY |
An attempt was made to free an active block. |
EDS_INVALID_TYPE |
An invalid data type was specified. |
EDS_INVALID_COLUMN |
An invalid column number was specified. |
EDS_BIND_ERR |
An invalid binding was attempted. |
EDS_CANCEL |
The user requested cancellation of an asynchronously processing command prior to completion. |
EDS_RESIZE_ARRAY |
The array size was insufficient. Use RESIZE and call again. |
Internal EDS error codes have a value less than or equal to EDS_INTERNAL_ERR_START. Call EDSQueryInternalError to retrieve the EDS error message text into an ESL HSTRING variable.
The following table defines the return codes from ODBC commands called by EDS.
EDS ODBC Return Code |
Description |
EDS_SUCCESS |
Function completed successfully; no additional information is available. |
EDS_SUCCESS_WITH_INFO |
Function completed successfully, possibly with a non-fatal error. The application can call EDSError to retrieve additional information. |
EDS_NO_DATA_FOUND |
All rows from the result set have been fetched. |
EDS_ERROR |
Function failed. The application can call EDSError to retrieve error information. |
EDS_INVALID_HANDLE |
Function failed due to an invalid environment handle, connection handle, or statement handle. This indicates a programming error. No additional information is available from EDSError. |
EDS_STILL_EXECUTING |
A command that was started asynchronously is still executing. |
EDS_NEED_DATA |
While processing a statement, the driver determined that the application needs to send parameter data values. |
Synchronous Requests
The following table outlines the return codes that the EDS client interface will return to your application upon command completion.
Return Code |
Description |
EDS_ERROR |
Function failed; call EDSError for more information. |
EDS_INVALID_HANDLE |
An invalid handle was passed to a command; no further information is available. |
EDS_NO_DATA_FOUND |
All rows from the result set have been fetched. |
EDS_SUCCESS |
Function completed successfully; no additional information is available. |
EDS_SUCCESS_WITH_INFO |
Function completed successfully; call EDSError for additional information. |
Asynchronous Requests
When your application calls one of the asynchronous-capable EDS commands with an asynchronously-enabled statement handle, the EDS command will return immediately so your application can continue doing useful work. When the command has completed its work, EDS uses the stimulus-response mechanism to post a message to your application. Your application can then respond as follows:
stimulus EDSStimulus "EDS"
If processing was successful:
response to stimulus EDSStimulus EDS_SUCCESS_STIMULUS HSTMT
If processing was successful, with some additional information:
response to stimulus EDSStimulus EDS_SUCCESS_WITH_INFO_STIMULUS HSTMT
If processing was unsuccessful:
response to stimulus EDSStimulus EDS_ERROR_STIMULUS HSTMT
If processing was unsuccessful due to an invalid handle:
response to stimulus EDSStimulus EDS_INVALID_HANDLE_STIMULUS HSTMT
The following table outlines the events that the EDS client interface will generate and post to your application.
Event |
Description |
EDS_ERROR_STIMULUS |
Function failed; call EDSError for more information. |
EDS_INVALID_HANDLE_STIMULUS |
An invalid handle was passed to a command; no further information is available. |
EDS_NO_DATA_FOUND |
All rows from the result set _STIMULUS have been fetched. |
EDS_CANCEL_STIMULUS |
The command was cancelled using EDSCancel. |
EDS_SUCCESS_STIMULUS |
Function completed successfully; no additional information is available. |
EDS_SUCCESS_WITH_INFO_STIMULUS |
Function completed successfully; call EDSError for additional information. |