You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a SyBase DB table with field of type "float", so I have declared a C# backend field of type "float" also.
When I execute ExecuteReader(sqlQuery), in the retourned AseDataReader class, the column type of field is "double".
When converting this double value to backend "float" field I have precission loss.
How can I force AseDataReader to map column to "float" type as defined in DB ??
Environment
.NET Core version 3.1
AdoNetCore.AseClient : 0.19.2
The text was updated successfully, but these errors were encountered:
the column you're dealing with is a float with a default precision greater or equal to 16 then your float is actually stored as a double
Now from my understanding of this driver implementation if you are in the first case then it will consider the value as TDS_FLT4 leading to being represented as a float while in the second case the value will be considered as TDS_FLT8 and will be represented as a double. Then if you call the GetFloat method on the second case you'll get a double that is then converted to a float.
I have a SyBase DB table with field of type "float", so I have declared a C# backend field of type "float" also.
When I execute ExecuteReader(sqlQuery), in the retourned AseDataReader class, the column type of field is "double".
When converting this double value to backend "float" field I have precission loss.
How can I force AseDataReader to map column to "float" type as defined in DB ??
Environment
AdoNetCore.AseClient
: 0.19.2The text was updated successfully, but these errors were encountered: