|
<< Click to Display Table of Contents >> Step 9: Get the desired record from the cursor (table) |
![]() ![]()
|
After creating the record buffer and positioning the cursor’s record pointer, read one record’s data into the memory buffer using the function DbiGetNextRecord.
When calling DbiGetNextRecord, specify the source cursor with the variable hCur that was set in a previous step (for DbiOpenTable). Indicate the lock type for the record access in the eLock argument for DbiGetNextRecord. Here, the constant dbiNOLOCK is used to access the record without locking it. Specify the record buffer as the pRecBuc argument. This example’s record buffer was created in step 7. No optional record properties are used in this example, so nil is passed for the precProps argument. On executing, DbiGetNextRecord makes that next record the current one.
Check(DbiGetNextRecord(
hCur, // Cursor from which to get the record
dbiNOLOCK, // Lock type
RecordBuffer, // Memory buffer to store the record
nil)); // Optional record properties