FireDAC.Comp.Client.TFDTable.Open
Delphi
procedure Open(const ATableName: String); overload;
C++
HIDESBASE void __fastcall Open(const System::UnicodeString ATableName)/* overload */;
inline void __fastcall Open(const System::UnicodeString ASQL, const System::Variant *AParams, const int AParams_High){ TFDRdbmsDataSet::Open(ASQL, AParams, AParams_High); }
inline void __fastcall Open(const System::UnicodeString ASQL, const System::Variant *AParams, const int AParams_High, const Data::Db::TFieldType *ATypes, const int ATypes_High){ TFDRdbmsDataSet::Open(ASQL, AParams, AParams_High, ATypes, ATypes_High); }
inline void __fastcall Open(){ Data::Db::TDataSet::Open(); }
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FireDAC.Comp.Client.pas FireDAC.Comp.Client.hpp |
FireDAC.Comp.Client | TFDTable |
Description
Opens the specified database table.
Call Open to open the database table specified in ATable
. If ATable
is empty, then it is assigned to the TableName property.
The method closes the dataset if it was active, then it assigns ATable
to the TableName, and sets the Active property to True. When Active is True, the dataset is populated with data from a database.
If the DBMS returns an error, then FireDAC raises an exception, which can be analyzed in the OnError event.
Example
FDTable1.Open('customers');
FDTable2.Open('[Order Details]');