#1 2021-12-07 05:47:14

wxinix
Member
Registered: 2020-09-07
Posts: 121

TRawUTF8List not saved to DB?

I have a TSQLRecord derived class, which has a TRawUTF8List field.

  TConfig = class(TSQLRecord)
  private
    FExcludedMACList: TRawUTF8List;
  public
    constructor Create;
    destructor Destroy; override;
  published
    property ExcludedMACList: TRawUTF8List read FExcludedMACList write FExcludedMACList;
  end;


I tried to save it to a static object list db, but the TRawUTF8List field always saves as "null".  Is there something wrong?

Offline

#2 2021-12-07 08:27:48

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

Re: TRawUTF8List not saved to DB?

I guesss it is because your constructor is not correct: you did hide the TSQLRecord constructor - you need to make it override.

I am almost certain their is a compiler message about it.
Please fix all compiler error messages at first.

Offline

#3 2021-12-07 14:09:22

wxinix
Member
Registered: 2020-09-07
Posts: 121

Re: TRawUTF8List not saved to DB?

@ab - you are right!  After making the constructor override, everything works!

Offline

Board footer

Powered by FluxBB