ARGetListSQL
Privileges
AR System administrator.
Synopsis
#include "arerrno.h"
#include "arextern.h"
#include "arstruct.h"
int ARGetListSQL(
ARControlStruct *control,
char *sqlCommand,
unsigned int maxRetrieve,
ARValueListList *valueListList,
unsigned int *numMatches,
ARStatusList *status)
Input arguments
control
The control record for the operation. It contains information about the user requesting the operation, where that operation is to be performed, and which session is used to perform it. The user and server fields are required.
sqlCommand
The SQL command to execute (following the syntax rules for the underlying database). The owner of the AR System server process must have permission to perform the specified SQL operation.
maxRetrieve
The maximum number of rows to be retrieved. Use this parameter to limit the amount of data returned if the SQL query does not sufficiently narrow the list.
Specify 0 (AR_NO_MAX_LIST_RETRIEVE) to assign no maximum.
Return values
valueListList
A list of zero or more (accessible) rows that match the criteria defined by the sqlCommand parameter. Each item in the list represents one matching row, each of which contains a list of the selected column values. The system returns a list with zero items if no rows match the specified criteria.
numMatches
The total number of (accessible) rows that match the SQL selection criteria. This value does not represent the number of rows returned unless the number of matching rows is less than or equal to the maxRetrieve value. Specify NULL for this parameter if you do not want to retrieve this value.
status
A list of zero or more notes, warnings, or errors generated from a call to this function. For a description of all possible values, see Error-checking.