|
<< Click to Display Table of Contents >> DbiGetField |
![]() ![]()
|
C syntax
DBIResult DBIFN DbiGetField (hCursor, iField, pRecBuf, [pDest], [pbBlank]);
Delphi syntax
function DbiGetField (hCursor: hDBICur; iField: Word; pRecBuff: Pointer; pDest: Pointer; var bBlank: Bool): DBIResult stdcall;
Description
DbiGetField retrieves the data contents of the requested field from the record buffer.
Parameters
hCursor Type: hDBICur (Input)
Specifies the cursor handle.
iField Type: UINT16 (Input)
Specifies the ordinal number of the field within the record. Field numbers start with 1.
pRecBuf Type: pBYTE (Input)
Pointer to the record buffer.
pDest Type: pBYTE (Output)
Pointer to the client buffer that receives the data from the requested field. Optional.
pbBlank Type: pBOOL (Output)
Pointer to the client variable. Set to TRUE if the field is blank; otherwise, FALSE. Optional.
Usage
To determine if a field is blank or if a BLOB is NULL, DbiGetField can be called with pDest set to NULL. pbBlank is returned indicating whether the field is blank or nonblank.
The data that DbiGetField returns is based on the current translation mode of the cursor. If the record translation is set to xltNONE, DbiGetField returns the raw data in the driver's physical format. This is called a BDE physical type. If the translation mode is set to xltFIELD, the data is returned in a generic form (for example, a Paradox numeric value is returned as an 8-byte double). This is called a BDE logical type.
DbiGetField cannot be used to return the data contents of a BLOB field, although it can be used to determine if the BLOB field is empty.
Completion state
The output buffer pointed to by pDest (if supplied) contains the requested field. The output buffer pointed to by pbBlank (if supplied) indicates whether the field is blank.
DbiResult |
Meaning |
DBIERR_NONE |
Data contents were retrieved successfully. |
DBIERR_INVALIDHNDL |
The specified cursor handle is invalid or NULL. |
See also
DbiPutField, DbiInsertRecord, DbiGetNextRecord, DbiGetPriorRecord, DbiGetRelativeRecord, DbiGetRecord