|
<< Click to Display Table of Contents >> Step 6: Get the properties of the table |
![]() ![]()
|
To get record information from the table, you need to determine the size of the record buffer. This is one of the cursor properties returned by the DbiGetCursorProps function. Other properties you can use DbiGetCursorProps to retrieve include the table name, the size of the table, and the number of fields in the table.
In this example, the table for which properties are retrieved is specified in the variable hCur (set in the example for DbiOpenTable). DbiGetCursorProps returns properties into a structure of type CURProps, here, the variable named CursorProps. The iRecBufSize field of this structure contains the record size. The record size retrieved here is needed in the next step where the record is read from the table into a memory buffer.
var
CursorProps: CURProps; // Data cursor properties
begin
…
Check(DbiGetCursorProps(
hCur, // Handle to the cursor
CursorProps)); // Properties of the cursor (table)
…
end;