Einzelnen Beitrag anzeigen

Daniel
(Co-Admin)

Registriert seit: 30. Mai 2002
Ort: Hamburg
13.919 Beiträge
 
Delphi 10.4 Sydney
 
#2

AW: FMX-FireDac "!" Fehler oder Feature?

  Alt 17. Jun 2014, 13:01
Das ist kein Fehler in FireDAC. Eigentlich ist Deine Herangehensweise nicht ganz sauber - die Query zu parametrisieren, wäre eigentlich besser und würde das o.g. Problem sofort lösen. Alternativ kannst Du auch die Eigenschaft "ResourceOptions.MacroExpand" auf "false" setzen.

Ich zitiere aus der Doku:

Use MacroExpand property to control macros expansion. If it is True, then their values will be substituted into SQL command text instead of corresponding macro markers. If it is False, then FireDAC does not substitute macro values into command text. The default value is True.
Setting MacroExpand to False, may be usefull if:
• target DBMS uses '!', '&' symbols in its own SQL dialect and FireDAC cannot recognize them as a SQL construction. Then SQL commands with these symbols may confuse FireDAC SQL preprocessor. See Preprocessing Command Text (  see page 56) for macros description.
• application does not use macros at all.
Setting PreprocessCmdText (  see page 878) to False, sets MacroExpand to False.
Daniel R. Wolf
mit Grüßen aus Hamburg
  Mit Zitat antworten Zitat