ade_qlgetqryinfo

Land Desktop Development ARX CPP SDK

Up a level
ade_qlgetqryinfo
 
 

Gets information about a query.

struct resbuf*

ade_qlgetqryinfo(

ade_id qry_id,

char* info);

Returns the requested information or NULL.

qry_id Query ID.
info Information type. See the Information Types table below.

You must release the resbuf.

Information Types
name Query name.
description Query description.
category Category name.
qtype Query type: 1 = internal, 2 = external.
filename For an externally saved query, full path name (string).

A query gets a name and an ID when it is saved to a query category of the query library. A new query that you have not yet saved does not have a name or an ID.

The following sample obtains a query ID using ade_qlqrygetid(). Ade_qlgetqryinfo() is called with all required parameters and status information is displayed based on the resbuf returned by the function. The resbuf is then released as required.

char* pszQueryName = "LocAll";
ade_id queryId = ade_qlqrygetid(pszQueryName);
char* pszQueryInfo = "category";
struct resbuf* pQueryInfoRb = ade_qlgetqryinfo(
                                queryId,
                                pszQueryInfo);
if (NULL != pQueryInfoRb) {
    acutPrintf(
        "\nThe \"%s\" query is contained within the \"%s\" query category."
        ,pszQueryName, pQueryInfoRb->resval.rstring);
}
else {
    acutPrintf(
        "\nThe requested information could not be found.");
}
acutRelRb(pQueryInfoRb);