Mohamad
Mohamad

Reputation: 1117

Equivalent TADOQuery.Properties in TFDQuery

What is the equivalent of TADOQuery.Properties in TFDQuery (FireDAC) in Delphi (XE7)?

I have used QUsers.Properties['Unique Table'].Value in a project and I'm going to convert it (from ADO components) to FireDAC components.

Upvotes: 1

Views: 848

Answers (2)

da-soft
da-soft

Reputation: 7750

To some degree that will be TFDQuery.UpdateOptions.UpdateTableName property: http://docwiki.embarcadero.com/Libraries/Seattle/en/FireDAC.Stan.Option.TFDBottomUpdateOptions.UpdateTableName

Upvotes: 1

androschuk.a
androschuk.a

Reputation: 289

I think you can use macros in TFDQuery (see docwiki.embarcadero.com)

FDQuery1.SQL.Text := 'SELECT * FROM !TABLE_NAME_MACROS !WHERE_CLAUSE';

FDQuery.MacroByname('TABLE_NAME_MACROS').AsRaw := 'my_table';
FDQuery.MacroByname('WHERE_CLAUSE').AsRaw := 'WHERE ID = :ParamID';

FDQuery.ParamByname('ParamID').AsInteger := 1;

FDQuery1.Open;

Upvotes: 0

Related Questions