Error loading Aurelius TBlob Field in TAdvRicheditor.LoadfromStream()

Get a Stream Read Error when loading a TBlob Aurelius Prperty via XData in a TAdvRicheditor.

This is my Aurelius Class:
TMandant = class
[Column('Notiz', [TColumnProp.Lazy])]
FNotiz: TBlob;

This is my code:

var aStream : TBytesStream;
// Loading Aurelius-TBlob-Property via XData Server
aStream := TBytesStream.Create(Mandant.Notiz);
// Loading into a TMemo works
// Loading in a TRichedit works
// Loading in a TAdvRicheditor does not work

How to load TBlobs from Aurelius-Classes via XData in a TAdvRichEditor?

  1. please describe : does not work
  2. in what specific format is this stream data? is it compatible with TAdvRichEditor?

The Errrormessage is in german "Stream Lesefehler" Stream Readerror.
It should be the TAdvRichedit-format because the Aurelius TBlob Field from a SQLite-DB is filled with following code:

var TempStream : TBytesStream;
TempStream := TBytesStream.Create;
Tempstream.Position := 0;

TAdvRichedit -> Xdata -> Aurelius and vice versa. Nothing else between.

Btw: The content of the Tblobfield in SQLLite looks like binary stuff.

I suggest to compare byte-wise the input stream & output stream and verify these are the same streams. If this isn't the case, it is something in the storage.

You are right. Outputstream from AdvRicheditor is not fully saved in Aurelius Blob Property when using Streams. The Data is truncated.

The following code works without changing anything on the Aurelius / XDATA side

// Loading into a AdvRicheditor from Aurelius / XData TBlob
Mandant := XDataclient.Get(1);
AdvRichEditor.InsertAsRTF( Mandant.Notiz.AsUnicodeString)

// Saving to an Aurelius / XData Blob Property
Mandant.Notiz.AsUnicodeString := AdvRichEditor.ContentAsRTF;

Maybe you can ask Wagner if he could manage to load and save an Aurelius TBlob Property via Xdata into a TAdvRicheditor with Streams. It seems, that the error is on the side of Aurelius. I am using the native SQLite-Driver from XData.

When i kick off Aurelis and load the data out of the same Table with Firedac and Xdata with my own code and querys stream loading and saving into TAdvRicheditor works.

Sorry, but your descriptions are a little bit "truncated". It's confusing to understand what's going on.

The above code doesn't make sense, because TBytesStream can't read a TBlob.

The above code also shouldn't work, because once you read a stream, you should set position back to 0 to read it again.

Now you say the above code works. Then, what is not working?

Please describe the whole process.
Also, then, please test the same process using a TMemo and maybe a binary file (like an image), to isolate and understand better if the problem is with the saving process or the visual control.