|
<< Click to Display Table of Contents >> DbiOpenList functions |
![]() ![]()
|
One series of inquiry function calls, in the form DbiOpenxxxList, return a cursor handle to an in-memory table listing the requested information. The cursor to an in-memory table is read-only, so that the application is prohibited from updating the table. Information can be retrieved from the in-memory table in the normal way, by preparing the record buffer, positioning the cursor, fetching each record into the record buffer, and using DbiGetField. Or each record can be read into the predefined structures assigned to the function.
These structures are listed in the BDE header file for the particular BDE-using programming tool used (for Borland C, this header file is called IDAPI.H, for C++Builder, it is BDE.HPP, and for Delphi it is BDE.INT).
List function |
Record structure |
The virtual table contains only one CHAR field. |
|
Example
This example illustrates the use of a static structure as the record buffer:
DBIResult rslt;
hDBICur hListCur;
IDXDesc idxDesc;
// Open a schema table which will contain 1 record for each
// index currently available for the given table.
rslt = DbiOpenIndexList(hDb, "Sample", szPARADOX, &hListCur);
if (rslt == DBIERR_NONE)
{
// Use a loop to retrieve each index descriptor
while (DbiGetNextRecord(hListCur, dbiNOLOCK, (pBYTE) &idxDesc, NULL) == DBIERR_NONE)
{
…
}
// Close the index list
DbiCloseCursor(&hListCur);
}