Data.DB.TDataSet.FieldByNumber

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function FieldByNumber(FieldNo: Integer): TField; inline;

C++

TField* __fastcall FieldByNumber(int FieldNo);

Properties

Type Visibility Source Unit Parent
function protected
Data.DB.pas
Data.DB.hpp
Data.DB TDataSet

Description

Finds a field based on the ordinal position of its column in the underlying table or query.

Call FieldByNumber to retrieve information for a field, given by the ordinal position of the field's column in the underlying table or query. FieldNo is the ordinal position of an existing field's column in the underlying table. FieldByNumber returns the TField component that represents the specified field. If the specified field does not exist, FieldByNumber returns nil for Delphi and NULL for C++.

An application can directly access specific properties and methods of the field returned by FieldByNumber.

See Also