6 37 LceGetRecordCount

LANSA Open Guide

6.37 LceGetRecordCount

Returns the number of records which were retrieved as a result of the LceReceiveSelect function.

BOOL

LceGetRecordCount

(int

iSession,

 

 

 char far * 

strFileName,

 

 

 int far *

piValue )

  

Parameters

iSession

The session identifier returned by LceGetSessionId.

strFileName

The file name. This file name must be the same as the file name used in the preceding LceReceiveSelect function.

piValue

The buffer location which will receive the returned value.

  

Return Values

TRUE is returned if the session has retrieved the record count of the select.

FALSE is returned if an error occurs.

Notes

The number retrieved can be used as a loop counter when processing the received records. The LceGetSelect function requires the number of the record it is to get. You can create a loop containing the LceGetSelect function, where the end condition is the value returned by this function.

This LceGetRecordCount function is used with a number of other select processing functions. The general pattern of these functions is as follows:

  • LceSetSelectOptions sets the selection search characteristics. The *RECEIVEIMMED option cannot be used with this function when it is used with this group of  functions.
  • LceRequestSelect selects records on the host.
  • LceReceiveSelect transfers the records from the host to the PC.
  • LceGetRecordCount determines how many records were transferred.
  • LceGetSelect retrieves a single record from the group of records transferred.
  • This function can only be executed after the LceRequestSelect and LceReceiveSelect functions have been issued.
  • This function performs no communications to the host.

Related Functions

6.64 LceSetSelectOptions

6.50 LceRequestSelect

6.51 LceRequestSelectWhere

6.49 LceReceiveSelect

6.48 LceReceiveNextX

6.53 LceSelect

6.11 LceDeleteSelect