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.

ARGetListSQL

Note

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.

Description

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.

Privileges

BMC Remedy AR System administrator.

Synopsis

#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

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 BMC Remedy AR System server process must have permission to perform the specified SQL operation.

maxRetrieve

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

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.

Note

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.

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.

See also

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

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

Comments