Sql-Server problem with datatype real
Posted: Tue 11 Jan 2011 15:45
Hello,
we are using UniDAC with Interbase 2009, Oracle 8.0.5 and MS SQL-Server 2008 RC2. Delphi 7 and UniDAC 3.50.0.13.
I have some tables with Float/Real-fields. So I checked some field-types:
1. Interbase: "double precision"
2. Oracle: "number"
3. Sql-Server: "float"
4. Sql-Server: "real"
When I created some tables with this fields, everything works good. But now I found a problem.
I made a simple Query
select myfield from mytable where myfield = '123'
and want to show this content with ShowMessage:
ShowMessage (MyUniQuery.FieldByName ('myfield').AsString);
I see the following result in my 4 cases:
1.: "1,4"
2.: "1,4"
3.: "1,4"
4.: "1,3999999999"
Why can't I see in the case Sql-Server / Datatype = real the value "1,4"?
Thanks in advance for this answer.
Kind regards,
Gerd Brinkmann
invent GmbH
we are using UniDAC with Interbase 2009, Oracle 8.0.5 and MS SQL-Server 2008 RC2. Delphi 7 and UniDAC 3.50.0.13.
I have some tables with Float/Real-fields. So I checked some field-types:
1. Interbase: "double precision"
2. Oracle: "number"
3. Sql-Server: "float"
4. Sql-Server: "real"
When I created some tables with this fields, everything works good. But now I found a problem.
I made a simple Query
select myfield from mytable where myfield = '123'
and want to show this content with ShowMessage:
ShowMessage (MyUniQuery.FieldByName ('myfield').AsString);
I see the following result in my 4 cases:
1.: "1,4"
2.: "1,4"
3.: "1,4"
4.: "1,3999999999"
Why can't I see in the case Sql-Server / Datatype = real the value "1,4"?
Thanks in advance for this answer.
Kind regards,
Gerd Brinkmann
invent GmbH