Delphi 11.2 FireDAC writing to database

Viewed 167

Previously, in Delphi 11.1, when writing to a database my code worked as intended. Now, after updating to Delphi 11.2, there is a problem when writing a record to a field with a '%' in the field name. Creating the field works fine but adding a a record to a field with a '%' in the name causes the following error:

ERROR: near ",": syntax error

When changing the '%' symbol, writing a record to the field works fine.

fieldbyname('test_%').asInteger := x;  //Causes syntax error
fieldbyname('test_pc').asInteger := x; //works as intended

I have also tried reading GetFieldNames() and this reads the field names as intended.

I just want to know why using a '%' symbol in the field name causes a syntax error?

1 Answers

Try changing FDConnection or FDQuery or FDTable

RessourceOptions.MacroExpand:=false;
RessourceOptions.MacroCreate:=false;
Related