Welcome, Guest
Username: Password: Remember me
Components and Libraries for Database Development, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

Get Float From Database. Win64 and Win32 different 9 years 10 months ago #5572

  • Dinko
  • Dinko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 91
  • Thank you received: 5
I'm using CT4.80 for Win 32 and Win 64
I want to report some small issue.

MyExtended := InQuery.FieldByName(InFieldName).AsFloat;

This code will return 10000 times greater number if you use Win64 version.
I made some small change in my code but this is workaround and not solution.
{$IFDEF WIN64}
MyExtended := MyExtended / 10000;
{$ENDIF}

InQuery is TSQLQuery
InFieldName is String

Can you please check this out

Please Log in or Create an account to join the conversation.

Get Float From Database. Win64 and Win32 different 9 years 10 months ago #5573

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4512
  • Thank you received: 1101
Thanks Sir
we will check this
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Get Float From Database. Win64 and Win32 different 9 years 10 months ago #5574

  • Dinko
  • Dinko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 91
  • Thank you received: 5
I forgot to wrote. Database is Windows Postgres 9.3

Please Log in or Create an account to join the conversation.

Get Float From Database. Win64 and Win32 different 9 years 9 months ago #5607

  • Dinko
  • Dinko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 91
  • Thank you received: 5
After some investigation I'm able to produce the error but not to fix it.

If you have type NUMERIC (16,4), and you get values with TField.asFloat you will get 10000 times bigger numbers
If you have type NUMERIC (16,5) (and higher precission), and you get values with TField.asFloat you will get normal values

It seems to me that this is some issue in TFloatField representation of such database types

Please Log in or Create an account to join the conversation.

  • Page:
  • 1