To read data from and write text data to a BLOB field, you need to use the InStreams and OutStreams objects as previously described.
The two methods in the following code read and write text data from and to a BLOB field defined in a custom table:
table 50120 MyBlobTable
{
DataClassification = CustomerContent;
fields
{
field(1;ID; Integer)
{
DataClassification = CustomerContent;
}
field(2; BlobField; Blob)
{
DataClassification = CustomerContent;
}
}
keys
{
key(PK; ID)
{
Clustered = true;
}
}
procedure SetBlobValue(value: Text)
var
outStr: OutStream;
begin
BlobField.CreateOutStream(outStr);
outStr.WriteText(value);
end;
procedure GetBlobValue(value...