You are not logged in.
Pages: 1
Given the following class:
TMyObj = class(TSQLRecord)
private
FBody: TSQLRawBlob;
published
property Body: TSQLRawBlob read FBody write FBody;
end;
I want to store an arbitrary stream, that I receive from somewhere else.
AStream.Position := 0;
MyObj.Body := StreamToRawByteString(AStream);
And to retrieve:
AStream := RawByteStringToStream(obj.Body);
AStream.Position := 0;
Is this the right way to save a stream to a blob? Does this work for binary files?
Last edited by leus (2020-12-15 19:24:01)
Offline
the answer is yes to both questions.
Offline
Pages: 1