6 35 LceGetMessage

LANSA Open Guide

6.35 LceGetMessage

This function retrieves an error message sent by the last function executed on the Host System.

The LceGetMessage function is useful if you are planning to program your own error handling. Host error messages generally result from database operations and operations such as LceExecute400, LceSubmit or LceLansaCall.

BOOL

LceGetMessage

(int

iSession, 

 

 

 int

iMessageNum,

 

 

 char far * 

strMessageBuf,

 

 

 int

iMessageBufLen )

  

Parameters

iSession

The session identifier returned by LceGetSessionId.

iMessageNum

The sequence number of the error message.

strMessageBuf

The buffer to return the message in.

iMessageBufLen

The size of the buffer.

  

Return Values

TRUE indicates that error messages were successfully retrieved.

FALSE indicates an error occurred.

Notes

Portability Considerations

The diagnostic and error messages returned by OAMs running on a Windows, Linux or other non-IBM i host system may be different to those returned by LANSA I/O Modules on the IBM i, as many of them are issued by the native DBMS. For example, DB2/400 on the IBM i, ODBC with SQL Server or SQL Anywhere on Windows.

  

The number of errors returned from the Host System can be determined by calling the LceGetMessageCount function.

  • This function performs no communications to the host.

Related Functions

6.12 LceDisplayErrors

6.36 LceGetMessageCount