We just upgraded from ASA 11 to ASA 16, and are noticing some test failures because values previously retrieved as 0.0000 and 4.500 are now coming in as 0 and 4.5. We are using the iAnywhere.Data.SQLAnywhere.v4.0 version 16.0.0.19484 Is there any setting we can change to get those zeroes preserved ? asked 22 Jul '14, 12:30 harko12 |
I have reproduced this change in behaviour with a simple datagrid.
I will check into this. answered 23 Jul '14, 10:10 JBSchueler 1
This is a bug that was introduced 2013/12. It will be corrected in 16.0 and 12.0.1 in an upcoming SP/EBF. The provider should only attempt to trim trailing zeroes when the precision of the incoming value exceeds Microsoft's maximum decimal precision (~29 digits).
(25 Jul '14, 11:47)
JBSchueler
|
Please show up the code that is generating the string data from the numeric values. I.e. what API are you using? Is the conversion to string being done on the client or the server? etc.
I will try to track down a good example.
I traced it down as far as I could. What it amounts to is we are creating a command, and doing an ExecuteReader on it, using the IDataReader interface, pointed to the iAnywhere.Data.SQLAnywhere dll. The direct value coming back from that reader is, in an example case, .051, and the same value when looked at in ISQL is .0150.
Which call on the IDataReader interface are you using to get back the data?
IDataReader ExecuteReader(CommandBehavior behavior)
with CommandBehavior.Default passed in