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's gravatar image

harko12
1113
accept rate: 0%

edited 23 Jul '14, 10:57

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.

(22 Jul '14, 12:44) Mark Culp

I will try to track down a good example.

(22 Jul '14, 15:44) harko12

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.

(22 Jul '14, 17:34) harko12
Replies hidden

Which call on the IDataReader interface are you using to get back the data?

(22 Jul '14, 19:17) Mikel Rychliski

IDataReader ExecuteReader(CommandBehavior behavior)

(23 Jul '14, 07:47) harko12

with CommandBehavior.Default passed in

(23 Jul '14, 07:49) harko12
showing 5 of 6 show all flat view

I have reproduced this change in behaviour with a simple datagrid.

SACommand      selectCmd = new SACommand( "SELECT * FROM Numerics", conn );
SADataReader   dr = selectCmd.ExecuteReader();
System.Windows.Forms.DataGrid dataGrid;
dataGrid = new System.Windows.Forms.DataGrid();
dataGrid.Location = new Point(10, 10);
dataGrid.Size = new Size(575, 200);
dataGrid.CaptionText = ".NET Example";
this.Controls.Add(dataGrid);
dataGrid.DataSource = dr;
dataGrid.Show();
dr.Close();

I will check into this.

permanent link

answered 23 Jul '14, 10:10

JBSchueler's gravatar image

JBSchueler
3.3k41564
accept rate: 19%

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
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×8

question asked: 22 Jul '14, 12:30

question was seen: 1,731 times

last updated: 25 Jul '14, 11:47