|
The QMReadList() function reads a select list into a dynamic array in the client application. It is analogous to the QMBasic READLIST statement.
The function arguments are:
| ListNo | is the number of the select list to be read in the range 0 to 10. |
| Err | receives an error value indicating the outcome of the request. This argument is not present in all variants of the QMClient API. |
If the action is successful, the returned value contains a field mark delimited set of unprocessed entries from the given list. The original list is destroyed by this action.
See Select lists in QMClient sessions for a description of the alternative ways to handle select list with QMClient.
The example program fragments below build select list 1 as a list of all records in the file open as fClients and then transfer this to a dynamic array named List.
char * QMReadList(int ListNo)
QMSelect(fClients, 1);
List = QMReadList(1);
The returned pointer references a dynamically allocated memory area that must be released using QMFree() when no longer needed.
If there is no data to read, the function returns NULL.
|
QMReadList(ByVal ListNo as Integer) as String
QMSelect fClients, 1
List = QMReadList(1)
If there is no data to read, the function returns Nothing.
|
ReadList(ListNo, Err)
session->Select(fClients, 1)
List = session->ReadList(1, Err)
If there is no data to read, the function returns an empty string.
|
String QMReadList(int ListNo)
qm.Select(fClients, 1);
List = qm.ReadList(1);
If successful, the ServerError property value is set to SV$OK. Other values indicate an error in which case the function returns an empty string.
|
ReadList(ListNo)
qm.Select(fClients, 1)
List = qm.ReadList(1)
The function returns the list data as a field mark delimited string. If there is no data to read, the function returns an empty string.
|
|