Data.DB.TDataSet.FieldByNumber

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: function
Visibility: protected
Source:
Data.DB.pas
Data.DB.hpp
Unit: Data.DB
Parent: TDataSet

Delphi

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

C++

TField* __fastcall FieldByNumber(int FieldNo);

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