On Wednesday 10 August 2011 11:51:41 Ludo Brands wrote: > What I propose is: > 1 to create overloaded versions of SetFieldData and GetFieldData that > include a length parameter, to change TStringField.SetAsString and > TWideStringField.SetAsWideString to use these versions and to migrate the > different datasets to use these new versions. This way existing (user) code > using SetFieldData/GetFieldData will still work (and the user still being > responsible for buffer overruns...) and datasets can correctly save and > retrieve strings while improving performance. > 2 change the bufdataset internal storage for ftstring and ftwidestring > fields to include the string length so that stored strings can be retrieved > in full when containing #0 characters and without having to copy > systematically datasize bytes. However this will introduce an incompatible > binary format for TFpcBinaryDatapacketReader. Having a second > FpcBinaryIdent would allow for both formats to co-habitate. > MSEgui version of tbufdataset uses UnicodeString in recordbuffer for string fields, see file lib/common/db/msebufdataset.pas.
Martin _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal