Issue with the datatype of Date and Datetime returned from sql query were different

Hi,

In Delphi 11, when the datetime type field was attempted to be returned as a date from a SQL query, it was returned as “ftwidestring.” The value was null as a result, and the variable could not be used in other queries to fetch the data.

To further understand the problem, a sample test case and document are included.
NullExcptn.7z (15.4 KB)

SS.docx (192.9 KB)

Hi,

if you do the same SQL (select cast(dt_col1 as date) from table) w/o PS, what datatype will be returned by DevartSQLConnection for Fields[0]?

I’ve suspicion that this is Devart issue and it may return ftWideString for every cast.

Hi,

It’s an issue from Devart side. Thanks and sorry .

1 Like