Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread BCD - decimals
Sun, Jan 25 2015 7:09 AMPermanent Link

Paul Waegemans

IMS bvba

Avatar

See the document hereby enclosed.

I see different things opening the same table in dbsys and in my Delphi XE5 application!!!


Paul Waegemans



Attachments: BCD-fields.docx
Sun, Jan 25 2015 7:32 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Paul


I don't have either XE5 or the latest DBISAM so I'm guessing here

<<How is this possible? Hasi this something to do with moving from Delphi 5 Enterprise to Delphi XE5 ?>>

I'd say almost certainly If you're using persistent fields then have a look to see what the size is for the BCD fields - it may have been set as 4


Roy Lambert
Mon, Jan 26 2015 9:46 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Paul,

Make sure that you are not converting the fixed point values to a floating point value. That might happen if you are not using the correct filed variable types.
For BCD fields:
  - The corresponding persistent field type is TBCDField
  - The method to use to assign or read values is ".AsCurrency"
  - The corresponding Delphi variable type is "Currency"

--
Fernando Dias
[Team Elevate]
Sat, Jan 31 2015 10:39 AMPermanent Link

Paul Waegemans

IMS bvba

Avatar

The size = 2




Roy Lambert wrote:

Paul


I don't have either XE5 or the latest DBISAM so I'm guessing here

<<How is this possible? Hasi this something to do with moving from Delphi 5 Enterprise to Delphi XE5 ?>>

I'd say almost certainly If you're using persistent fields then have a look to see what the size is for the BCD fields - it may have been set as 4


Roy Lambert



Attachments: Picture0001.jpg
Sun, Feb 1 2015 3:29 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Paul


OK the next stage is to see if DBSys handles BCD fields differently to your application. Have a look in the source and see if Tim is setting DisplayFormat, OnGetText for the field or if the grid is modified in any way.

Roy Lambert
Image