DbiOpenFieldList

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiOpenFieldList

Return to chapter overview

C syntax

DBIResult DBIFN DbiOpenFieldList (hDb, pszTableName, [pszDriverType], bPhyTypes, phCur);

Delphi syntax

function DbiOpenFieldList (hDb: hDBIDb; pszTableName: PChar; pszDriverType: PChar; bPhyTypes: Bool; var hCur: hDBICur): DBIResult stdcall;

Description

DbiOpenFieldList creates a table listing of fields in a specified table and their descriptions.

Parameters

hDb                Type: hDBIDb                (Input)
Specifies the database handle.

pszTableName                Type: pCHAR                (Input)
Pointer to the table name. For Paradox, FoxPro, and dBASE, if pszTableName is a fully qualified name of a table, the pszDriverType parameter need not be specified. If the path is not included, the path name is taken from the current directory of the database associated with hDb.

For SQL databases, this parameter can be a fully qualified name that includes the owner name.

pszDriverType                Type: pCHAR                (Input)
Pointer to the table type. Optional. For Paradox, FoxPro, and dBASE tables, this parameter is required if pszTableName has no extension. This parameter is ignored if the database associated with hDb is a SQL database. pszDriverType can be one of the following values: szDBASE, szMSACCESS, or szPARADOX.

bPhyTypes                Type: BOOL                (Input)
Specifies whether physical or logical field types are returned. Physical types represent the data in its native state, specific to each driver. Logical types are the generic, derived BDE translations of the native data types. bPhyTypes can be set to TRUE or FALSE. TRUE indicates that native physical types are returned; FALSE indicates that BDE logical types are returned.

phCur                Type: phDBICur                (Output)
Pointer to the field list table.

Usage

This function retrieves field information from a closed table, as opposed to DbiGetFldDescs which uses an opened table. After the record is retrieved, it can be cast with the FLDDesc type definition, and used like a FLDDesc C language structure.

DbiResult

Meaning

DBIERR_NONE

The cursor to the table was returned successfully.

DBIERR_INVALIDHNDL

The specified database handle is invalid or NULL.

DBIERR_INVALIDPARAM

The specified table name or the pointer to the table name is NULL.

DBIERR_UNKNOWNTBLTYPE

The specified driver type is not known.

DBIERR_NOSUCHTABLE

The specified table is invalid.

See also

DbiOpenFileList, DbiOpenTableList, DbiGetNextRecord, DbiGetPriorRecord, DbiOpenFamilyList, DbiSetDirectory, DbiGetCursorProps, DbiGetFieldDescs