DbiTranslateField

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiTranslateField

Return to chapter overview

C syntax

DBIResult DBIFN DbiTranslateField (hXlt, pSrc, pDest);

Delphi syntax

function DbiTranslateField (hXlt: hDBIXlt; pSrc: Pointer; pDest: Pointer): DBIResult stdcall;

Description

DbiTranslateField translates a logical or physical field value to any compatible logical or physical field value.

Parameters

hXlt                Type: hDBIXlt                (Input)
Specifies the translate handle.

pSrc                Type: pBYTE                (Input)
Pointer to the source field.

pDest                Type: pBYTE                (Output)
Pointer to the destination field.

Usage

This function reads the source field and places the data in the destination field after converting the data to the type of the destination field.

SQL: This function can be used only on fields that are contained with a valid SQL record buffer. You must build the translation object by using a BDE-supplied field descriptor because each field descriptor contains an offset to a NULL indicator and each field translation must read or write this NULL indicator. The offset from the field buffer to the NULL indicator is stored when the translation object is built.

DbiResult

Meaning

DBIERR_NONE

The field was translated successfully.

DBIERR_FIELDISBLANK

The source field is blank.

See also

DbiOpenFieldXlt, DbiCloseFieldXlt, DbiTranslateRecordStructure