6.40 LceGetStatus
Returns the error status and any messages from LANSA Open functions which result in an error return code.
VOID |
LceGetStatus |
(long far * |
plErrorCode, |
|
|
char far * |
strErrorMessage, |
|
|
int |
iMsgLen ) |
Parameters
plErrorCode |
Pointer to the variable to receive the error status. 0 = a successful return. Non-zero = an error occurred. |
strErrorMessage |
Array to receive error messages, if any. This array will be empty if no error message text is found. |
iMsgLen |
Maximum number of characters to copy to strErrorMessage. |
Return Values
None
Notes
Portability Considerations |
The Validation error (36) and I/O error (37) returned by OAMs on Windows, Linux or other non-IBM i platforms, may be different to those returned by LANSA I/O Modules on an IBM i, as many of them translate from the native DBMS. For example, DB2/400 on the IBM i, ODBC with SQL Server or SQL Anywhere on Windows. |
LANSA Open maintains a local error message area. When a LANSA Open function returns an error, the error message associated with the error is saved, provided the error message area is empty. If it is not empty, the message is ignored.
LceGetStatus retrieves the error message(s) and at the same time clears the error message area. LceGetStatus, therefore, needs to be executed after every LceGetFunction function.
- This function performs no communications with the host.
Tip
An alternative to LceGetStatus is LceDisplayErrors, LANSA Open's automated error message handing facility.
Related Functions