I'm retrieving the Firebird and Mysql tables by Firedac Connection through the command line GetFieldNames
, however some fields in the list are returned with quotation marks.
I have tried to insert the MetaDefCatalog=MySql
directive into the parameters and it did not solve anything.
Below is the code I use to fetch the list of fields from a table:
Lista:=TStringList.Create;
FDConnection.GetFieldNames('','',Tabela,'',Lista);
if Lista.IndexOf('Campo') > 0 then
//comandos para criar campo na tabela
The problem is that when the field is quoted by Firedac ( DBExpress
did not do this) the if
clause asks to create the field that already exists and generates an error. / p>
How do I resolve this?
Thank you !!!