I've been warming my brains for two days and I do not discover the problem. I have a SQL statement (TFDQuery) written in the code and it selects three fields from a table to display them in a DBGrid. I do not know what happens. The third field is never shown. And if I retained one of the two fields that appear in the DBGrid of the SQL statement, it gives runtime error saying that the field is missing.
The SQL statement is as below:
Note: DataSet is a TFDQuery. When I started using it, I typed the statement below directly into the SQL Command tab of the component's Query Editor, but without the aluNasurement field. I then wrote the statement in the code for runtime and added the aluNascimento.
FormSearch.DataSet.SQL.Text: = 'SELECT idAluno, aluName, aluNascimento FROM Students WHERE aluName LIKE: Name';
The aluNasurement field does not appear in the DBGrid. And if I remove the idAluno or aluName field from the SQL statement, the runtime error appears saying that the field is missing.
Has anyone ever had anything similar?
Thanks for any help.