|
<< Click to Display Table of Contents >> DbiGetDescs functions |
![]() ![]()
|
Inquiry function structures are supplied by the application. These function calls return descriptive information.
List function |
Record structure |
DBDesc structure |
|
DRVType structure |
|
Array of FLDDesc structures |
|
FLDType structure |
|
IDXDesc structure |
|
Array of IDXDesc structures |
|
IDXType structure |
|
TBLType structure |
|
STMTBaseDesc structure |
Example
The following example shows how to retrieve all the index descriptors with one function call:
DBIResult rslt;
hDBICur hCursor;
CURProps curProps;
pIDXDesc pIdxArray;
// Open the table
rslt = DbiOpenTable(hDb, "Sample", szPARADOX, NULL, NULL, 0, dbiREADWRITE, dbiOPENSHARED, xltFIELD, TRUE, NULL, &hCursor);
if (rslt == DBIERR_NONE)
{
// Get the properties for the cursor
DbiGetCursorProps(hCursor, &curProps);
// Allocate the buffer for the index descriptors
pIdxArray = (pIDXDesc) malloc(sizeof(IDXDesc) * curProps.iIndexes);
// Get the indexes
rslt = DbiGetIndexDescs(hCursor, pIdxArray);
if (rslt == DBIERR_NONE)
{
…
}
// Clean up
free((pCHAR) pIdxArray);
DbiCloseCursor(&hCursor);
}