I have created a simple oracle table ( TESTTABLE ) with ID ( number, primary key, can not be null ) and TIME ( timestamp(6), can be null )
Attempts to read contents of the table using linqConnect are failing, for
var aa = (from a in context.TESTTABLEs
where a.TIME.GetValueOrDefault().AddDays(1) > DateTime.UtcNow
select a).FirstOrDefault();
I am getting exception
The argument 'value' was the wrong type. Expected 'System.DateTime'. Actual 'System.Nullable`1[System.DateTime]'.
If TIME can not be null, there are no problems.
Possible bug ? Nullable timestamps compared
Re: Possible bug ? Nullable timestamps compared
Thank you for the report. We have reproduced this issue. We will investigate it and notify you about the results as soon as possible.
As a workaround, you could try re-writing your query as follows:Please inform us whether this helps.
As a workaround, you could try re-writing your query as follows:
Code: Select all
var aa = (from a in context.TESTTABLEs
where a.TIME.Value.AddDays(1) > DateTime.UtcNow
select a).FirstOrDefault();
Re: Possible bug ? Nullable timestamps compared
The bug with nullable timestamps is fixed.
New build of dotConnect for Oracle 7.1.58 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=24670
New build of dotConnect for Oracle 7.1.58 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=24670