6 36 LceGetMessageCount

LANSA Open Guide

6.36 LceGetMessageCount

This function returns the number of messages which have been returned by the Host System.

BOOL

LceGetMessageCount

(int

iSession, 

 

 

 int far * 

piMessageCount )

  

Parameters

iSession

The session identifier as returned by LceGetSessionId.

piMessageCount

Pointer to the variable to hold the number of messages.

  

Return Values

TRUE indicates a successful return.

FALSE indicates an error occurred.

Notes

This 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.

The value returned by this function can be used as a loop parameter when retrieving messages using the LceGetMessage function. For example, if an LceUpdate failed, the host system may have sent a number of validation errors. This function can be used to determine the number.

  • This function performs no communications to the host.

Tip

If you use the LceDisplayErrors function, you will not need to use this function as all the error handling will be performed by LANSA Open.

Related Functions

6.12 LceDisplayErrors

6.34 LceGetIBMiSignon