we have a column called "[_004]" in our table.
Now we want to get a value from this query:
Code: Select all
query.SQL.Add('SELECT * FROM TABLE'); query.Open; query.SQLRefresh.Text := 'SELECT * FROM TABLE WHERE ID = :ID'; query.RefreshRecord;
Sometimes we get a value and sometimes we only get a NULL value.
When we delete "[_004]" from the query we get a value for each column.
Additionally when we skip the line "query.SQLRefresh.Text" we get a value even with the column "[_004]".
We guess the problem lies in setting the value for query.SQLRefresh.Text.
But we can't delete this line. We've a more complex code in production where we need it.
Do you have any suggestions?