|
<< Click to Display Table of Contents >> DbiPutField |
![]() ![]()
|
C syntax
DBIResult DBIFN DbiPutField (hCursor, iField, pRecBuf, pSrc);
Delphi syntax
function DbiPutField (hCursor: hDBICur; iField: Word; pRecBuff: Pointer; pSrc: Pointer): DBIResult stdcall;
Description
DbiPutField writes the field value to the correct location in the supplied record buffer.
Parameters
hCursor Type: hDBICur (Input)
Specifies the cursor handle.
iField Type: UINT16 (Input)
Specifies the ordinal number of the field to be updated.
pRecBuf Type: pBYTE (Input)
Pointer to the record buffer, which is updated upon success.
pSrc Type: pBYTE (Input)
Pointer to the new field value.
Usage
This function is used to update a record one field at a time. If a NULL pointer is supplied, the field is set to NULL or blank.
If the xltMODE for the cursor is xltFIELD, pSrc is assumed to contain field data in BDE logical format. This data is translated to the driver's physical type by this function. If xltMODE is xltNONE, pSrc is assumed to contain field data in physical format.
DbiPutField is not supported with BLOB fields.
Oracle8: DbiPutField on an ADT field is only supported if the value put is NULL. This will have the effect of nulling out all of the child fields of the ADT. DbiPutField of a non-NULL value on an ADT member sets all parent ADT fields to not NULL. DbiPutField with NULL on an ADT member does not set ADT parents to NULL, even if all siblings are NULL.
Prerequisites
DbiVerifyField may be called to test for field level integrity violations.
Completion state
After using DbiPutField one or more times, the client application must call DbiInsertRecord, DbiAppendRecord, or DbiModifyRecord to update the table with the record buffer. If the function fails, the record buffer is not affected.
DbiResult |
Meaning |
DBIERR_NONE |
The field was updated successfully. |
DBIERR_INVALIDHNDL |
The specified cursor handle is invalid or NULL. |
DBIERR_OUTOFRANGE |
iField is equal to zero, or is greater than the number of fields in the table. |
DBIERR_INVALIDXLATION |
A translation error has occurred. |
See also
DbiVerifyField, DbiAppendRecord, DbiInsertRecord, DbiModifyRecord, DbiSetToKey, DbiGetField, DbiPutBlob