On 3-8-2011 12:32, Ludo Brands wrote:
>> On 2-8-2011 7:39, Reinier Olislagers wrote:
>>> I've got trouble finding out how to fill and retrieve data for a
>>> ftVarBytes field in a TBufDataset.
>>> TestDataset.FieldByName('ftVarBytes').Asstring := Teststring;
>>> writeln('ftVarbytes.AsString: ' +
>>> TestDataset.FieldByName('ftVarBytes').AsString);
>
> This is the way to do it. However:
> - FieldDef.Size := 2; You only store 2 characters.
Oops. Correct.
> - TCustomBufDataset.GetFieldSize doesn't recognise TBinaryField descendants
> and fixes their length arbitrary as 10 bytes... Setting fieldsize to more
> than 10 bytes won't store more than 10 chars. TMemDataset handles this more
> elegantly by raising a SErrFieldTypeNotSupported.
> So the answer is that TBufDataset doesn' support TBinaryField descendants
> correctly.
>
> For test purposes, limit field size to 10 bytes ;)
Thanks for the answer, I will ;)
(I'll have a go at adding this info to the wiki as well)
Reinier
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal