Hello, I am newbie of Delphi.

Hello, I am newbie of Delphi.
Old c# app store extract 0.00004385964912 in PostgreSQL ( I have used numeric(38,20) and decimal in c#)

I found http://rvelthuis.de/programs/decimals.html in Delphi but don't know how to use it, I have try use decimals with Aurelius but has error "Unexpected field type : Decimals.Decimal"

[Entity]
[Table('test')]
[Id('FId', TIdGenerator.IdentityOrSequence)]
TTest = class
private
[Column('ID', [TColumnProp.Unique, TColumnProp.Required, TColumnProp.NoUpdate])]
FId: Integer;
FText1: string;
FNum1: Decimal;
public
property Id: integer read FId;
[Column('text1', [])]
property Text1: string read FText1 write FText1;
[Column('num1', [], 38, 20)]
property Num1: Decimal read FNum1 write FNum1;
end;

Please help me.
http://rvelthuis.de/programs/decimals.html

Comments

  1. That's related to Aurelius. Decimal is a record to "simulate" a primitive type, an Aurelius doesn't understand that - it's not supported. You would have to use native Delphi types in your mapped fields (like double or extended). You can still have your public property using Decimal type, but then you would have to use getters and setters to convert the Decimal public value to/from the private field

    ReplyDelete
  2. Wagner Landgraf Thank you very much. I will try that.

    ReplyDelete

Post a Comment