Page 1 of 1
Oracle timestamp accuracy?
Posted: Mon 15 Sep 2008 21:25
by pokaragat
:?:
I am using a trial version for OraDirect.
We have an oracle database and uses timestamp with 7 digit accuracy or timestamp(7) for a column which is part of the primary keys. Using OraDirect, the query returned has only 3 digit accuracy. Say, the data is 9/15/2008 3:39:30.1234567, the returned data is 9/15/2008 3:39:30.1230000.
So, where do I have to make changes to get the full 7 digit data.
Thanks.
Posted: Tue 16 Sep 2008 09:40
by Shalex
How have you got the timestamp value? Maybe, there are accuracy limitations of other components. To get such precision we recommend you to use the OracleTimeStamp Public Property named "Nanosecond". To obtain an OracleTimeStamp object call the GetOracleTimeStamp method of the OracleDataReader class.
Posted: Tue 16 Sep 2008 13:51
by pokaragat
I should have given more details.
I am evaluating DevForce EF, entity framework and evaluating OraDirect.Net as the Data Provider underneath. We have an existing application with oracle as the database and we're trying to replace the data access layer. So, the data is already there and we can no longer do anything. DevForce EF is only using the entity framework and the data definitions that the data provider has given.
So, I am not sure how OracleDataReader class comes into play. Maybe with this new info, you'll have a better understanding of the issue.
By the way, the 7 digit precision is working on ADO.net 2.0 microsoft OracleClient, either dataAdapter or datareader, which is our current implementation.
Posted: Wed 17 Sep 2008 13:36
by Shalex
There were loss of nanoseconds when transferring data from TIMESTAMP to System.DateTime. The problem is fixed. This implementation will be available in the next build (during a week).
Posted: Wed 17 Sep 2008 14:24
by pokaragat
Thanks for the quick response.
Please make sure that writing to the database works the same way. There was a loss of 4-digit too.
Posted: Mon 22 Sep 2008 17:09
by pokaragat
The query also does not work if the criteria invloves DateTime with timestamp oracle mapping. Say:
data.Where( c => c.Date == date );
where date has subseconds. The query returns nothing. If subseconds were removed from the database and from the query criteria, it returns value.
Posted: Mon 29 Sep 2008 13:34
by Shalex
The new build of OraDirect .NET version 4.75.43 is available!
Please visit
http://www.devart.com/forums/viewtopic.php?t=12982
Posted: Wed 01 Oct 2008 22:20
by pokaragat
The transfer of data to/from object to database works with subseconds, seven digit precision. However, the query:
domain.Where( c=> c.DATE == date );
DOES NOT work when the date criteria has subseconds.
I have stated this issue in the my previous post on this same thread.
Posted: Wed 08 Oct 2008 14:24
by pokaragat
To devart team, please let me know if you are doing something about this issue or what the status is. This is very critical to our system.
Posted: Thu 09 Oct 2008 10:26
by Shalex
The problem is fixed. It will be available in the next build.