3
I’m recovering the table fields Firebird and Mysql for Firedac Connection via the command line GetFieldNames
, however some fields of the list are returned with quotes.
I have tried to insert the directive into the parameters MetaDefCatalog=MySql
and solved nothing.
Below is the code I use to search the list of fields of 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 filled with quotes by Firedac (DBExpress
wouldn’t do that) clause if
asks to create the field that already exists and generates an error.
How do I fix it?
Thank you!!!
Junior, thank you for your answer. But what I hope is a way to normalize the problem in Fdconnection, because I have a huge version update file that uses this same Fdconnection.Getfieldnames function to find out if the field does not exist create it in the table.
– prmas
@prmas, Following change in response, detail, the Trial version here is Tool = RAD Studio XE7 Firedac = 11.0.1 (Build 73709)
– Junior Moreira