I'm using the FireDAC TFDQuery component to run a SQLSELECT statement against a SQL Server database. The SQL statement contains a few 'calculated' column expressions using SQL functions such asCONVERTandCAST. For example : CONVERT(DECIMAL(9, 6), 0) AS TotalHours and CONVERT(TINYINT, 0) AS WorkflowState.
In the resulting dataset, these calculatedTFieldobjects are always set toReadOnly=True. I want to populate these calculated fields in code after the dataset has been returned. I know I can do this by changing the ReadOnly property of each field :
FireDAC - TFDQuery - How to default calculated fields in the dataset to ReadOnly=False
in Databases
Posted · Edited by JonathanW
I'm using the FireDAC TFDQuery component to run a SQL
SELECT
statement against a SQL Server database. The SQL statement contains a few 'calculated' column expressions using SQL functions such asCONVERT
andCAST
. For example : CONVERT(DECIMAL(9, 6), 0) AS TotalHours and CONVERT(TINYINT, 0) AS WorkflowState.In the resulting dataset, these calculated
TField
objects are always set toReadOnly=True
. I want to populate these calculated fields in code after the dataset has been returned. I know I can do this by changing the ReadOnly property of each field :But is there a setting/option within the query components that I can use to force the fields created to always default to
ReadOnly=False
?