This documentation supports the 9.1 version of Remedy Action Request System.

To view the latest version, select the version from the Product version menu.



You can continue to use C APIs to customize your application, but C APIs are not enhanced to support new capabilities provided by Java APIs and REST APIs.


Retrieves a list of rows from the underlying SQL database on the specified server. The server executes the SQL command that you specify and returns the matching rows. A list with zero items and a warning message are returned if no SQL database resides on the server. The system returns information based on the access privileges of the user who launched the BMC Remedy AR System server.


BMC Remedy AR System administrator.


#include "ar.h"
#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


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.


The SQL command to execute (following the syntax rules for the underlying database). The owner of the BMC Remedy AR System server process must have permission to perform the specified SQL operation.


The maximum number of rows to retrieve. 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


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.


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.


Performing this count requires additional search time if the number of matching rows is more than the maxRetrieve value. In this case, the cost of completing the search diminishes the performance benefits of retrieving fewer rows.


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.

See also

ARExecuteProcess, ARGetListEntry. See FreeAR for: FreeARStatusList, FreeARValueListList.

Was this page helpful? Yes No Submitting... Thank you