Gentlefolk,
Environment: Laz 2.0.12, FPC 3.2.0, Firebird 3.07. Read the Firbird documentation.
I have a tIBQuery with an Select SQL statement which includes
'...A.RESULT_TYPE, cast(A.RESULT_PERF as varchar(15)),...'.
RESULT.PERF is defined in Firebird as type 'time'.
In the Select SQL Editor it 'Looks OK' on clicking test.
At run time on opening the table I get an EDataBaseError exception Field not found: "RESULT_PERF".
The field exists and if I remove the 'CAST' the table opens correctly.
Using vDebugStr := IBQDataResult.FieldByName('RESULT_PERF').AsString I get the time as '12:23:45'.
Unfortunately I need the millie seconds (123) of '12:23:45.123' which is in the fied in the Firebird record.
Any suggestions, Ian