Page 1 of 1

Bug #560 not reproducible, please ask for code!

Posted: 26.10.2022, 10:49
by aehimself
I have no SF account so can not post a comment on the bug.
https://sourceforge.net/p/zeoslib/tickets/560/

1, blob.Clear seems to work as intended.

Code: Select all

 ZMemTable1.FieldDefs.Add('ID', ftLargeint, 0, True);
 ZMemTable1.FieldDefs.Add('Name', ftString, 255, True);
 ZMemTable1.FieldDefs.Add('Data', ftBlob);

 ZMemTable1.Open;

 ZMemTable1.Append;
 ZMemTable1.FieldByName('ID').AsLargeInt := 1;
 ZMemTable1.FieldByName('Name').AsString := 'Hello';
 ZMemTable1.FieldByName('Data').AsBytes := TEncoding.Unicode.GetPreamble; // Just put something in
 ZMemTable1.Post;

 ZMemTable1.Edit;
 ZMemTable1.FieldByName('Data').Clear;
 ZMemTable1.Post;

 If ZMemTable1.FieldByName('Data').IsNull Then ShowMessage('Blob is null')
   ELse ShowMessage('Blob is not null');
is showing that the blob field is indeed empty. Something will be wrong with the code of the user.

2, Setting text for Blob, see comment in TBlobField.SetAsString:
// Use TWideMemoField for blobs associated with Unicode string data.
Don't use ftBlob for TDBMemo, use ftMemo or ftWideMemo instead.

Re: Bug #560 not reproducible, please ask for code!

Posted: 27.10.2022, 09:18
by marsupilami
aehimself wrote: 26.10.2022, 10:49 I have no SF account so can not post a comment on the bug.
Any chance for you to get one? ;)

Anyway: I asked for some example code:
https://sourceforge.net/p/zeoslib/tickets/560/#2f87

Let's see what happens :)