|
<< Click to Display Table of Contents >> DbiOpenFunctionArgList |
![]() ![]()
|
C syntax
DBIResult DBIFN DbiOpenFunctionArgList (hDb, pszFuncName, uOverload, phCur);
Delphi syntax
function DbiOpenFunctionArgList (hDb: hDBIDb; pszFuncName: PChar; uOverload: Word; var hCur: hDBICur): DBIResult stdcall;
Description
DbiOpenFunctionArgList opens a cursor to a schema table for the data source function defined by pszFunctionName for the driver associated with the hDb. Record description is of type DBIFUNCArgDesc.
Parameters
hDb Type: hDBIDb (Input)
Specifies the universal database handle.
pszFuncName Type: pCHAR (Input)
Name of data source function.
uOverload Type: UINT16 (Input)
Overload number, used with functions that take different sets of arguments.
phCur Type: phDBICur (Output)
Specifies returned cursor on the schema table "Arguments"
Usage
Use DbiOpenFunctionArgList to retrieve the arguments to functions supported by the data source. This information can be useful for clients developing a visual query builder.
When you call DbiOpenFunctionList, you get the number of overloads it can have. By passing the corresponding overload number (uOverload) to DbiOpenFunctionArgList you get the list of arguments that function takes with that particular overload number.
typedef struct {
DBINAME szName; // Function name
CHAR szDesc[255]; // Short description
UINT16 uOverload; // Number of function overloads
DBISTDFuncs eStdFn; // Corresponding to DBI standard function
} DBIFUNCDesc;
typedef DBIFUNCDesc far *pDBIFUNCDesc;
typedef struct {
UINT16 uArgNum; // Argument position num; 0 for fn return
UINT16 uFldType; // Field type
UINT16 uSubType; // Field subtype (if applicable)
UNIT16 ufuncFlags; // Functions Flags
} DBIFUNCArgDesc;
typedef DBIFUNCArgDesc far *pDBIFUNCArgDesc;
Prerequisites
DbiInit must be called, and hDB must reference a SQL data source.
Completion state
Returns a cursor with the function argument data, which must be closed by using DbiCloseCursor. If pszFunctionName is not a valid function associated for the driver asssociated with hDb, the cursor points to an empty table. It returns a 'not applicable' error if the hDb is associated with a local table.
DbiResult |
Meaning |
DBIERR_NONE |
The cursor on the table was opened successfully. |
DBIERR_INVALIDHNDL |
The specified database handle is invalid or NULL, or phCur is NULL. |
See also