NewField... TOraTimeStampField?
Posted: Tue 15 Sep 2015 14:05
I have a table declared like this
Put a TOraQuery on a form
From RAD Studio design, go to Structure>OraQuery1->Fields->New Field...
In the following form, I cannot select OraTimeStamp type. SQLTimestamp is wrong, since at runtime I get "field a_timestamp is of wrong type"
So I open the dfm and change the type from TSQLTimestampField to TOraTimestampField (the same on the .pas or .h) but this is not enough
"field a_timestamp is of wrong type. Got TOraTimestampField, expected TOraTimestampField"
weird.
Go back to dfm. Force DataType
I found that this workaround is made automatically if I select Add Fields... in the designer. Sadly, this requires that I have a database connection active while developing the application, and this is not always true.
Code: Select all
create table table_ts
(
--many fields....
a_timestamp timestamp(0) with time zone
--....
);
Code: Select all
select * from table_ts
In the following form, I cannot select OraTimeStamp type. SQLTimestamp is wrong, since at runtime I get "field a_timestamp is of wrong type"
So I open the dfm and change the type from TSQLTimestampField to TOraTimestampField (the same on the .pas or .h) but this is not enough
"field a_timestamp is of wrong type. Got TOraTimestampField, expected TOraTimestampField"
weird.
Go back to dfm. Force DataType
Code: Select all
object Qrya_timestamp: TOraTimeStampField
FieldName = 'a_timestamp'
DataType = 105
end