#1 2015-10-20 08:06:37

lagodny
Member
Registered: 2015-01-28
Posts: 50

TPropInfo.GetOrdProp problem...

I have a class

  TSQLRegisterCUTE = class(TSQLRecord)
  private
    FDoc: TRecordReferenceToBeDeleted;
  published
    property Doc: TRecordReferenceToBeDeleted read FDoc write FDoc;
  end;

I try to set Doc:

  aRec.Doc := aModel.RecordReference(TSQLDocPasterShiftReport, ID);
  aClient.Add(aRec, True);

In my code aRec.Doc = 22738

But in Database Doc = -46.

This value I got from TPropInfo.GetOrdProp.

In this function
  PropType^.Kind = tkInt64
But
  TOrdType(PByte(AlignToPtr(@PropType^.Name[ord(PropType^.Name[0])+1]))^) = otSByte
so 22738 converts to SingleByte = -46

What is wrong?

Offline

#2 2015-10-20 09:32:28

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,238
Website

Re: TPropInfo.GetOrdProp problem...

There was indeed a regression, introduced by recent definition of TRecordReference* types as Int64.

Should be fixed by http://synopse.info/fossil/info/a224b15b91
Sorry for the issue.

Thanks for the feedback!

Offline

#3 2015-10-21 06:03:05

lagodny
Member
Registered: 2015-01-28
Posts: 50

Re: TPropInfo.GetOrdProp problem...

Now everything is OK.
Thank you for the excellent work!

Offline

Board footer

Powered by FluxBB