On 15-8-2011 11:44, Reinier Olislagers wrote: > On 15-8-2011 11:25, Michael Van Canneyt wrote: >> I created a dataset with 2 fields. A ftString field with size 33, and a >> ftWideString field with size 44. >> >> Based on the following output from SaveToFile, I would say that you'll >> need to put Size*SizeOf(CharTypeUsedInfield), which should be DataSize. >> >> Michael. >> >> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <DATAPACKET >> Version="2.0"> >> <METADATA> >> <FIELDS> >> <FIELD attrname="stringveld" fieldtype="string" WIDTH="33"/> >> <FIELD attrname="WideStringVeld" fieldtype="string.uni" WIDTH="44"/> >> </FIELDS> >> <PARAMS/> >> </METADATA> >> <ROWDATA> >> </ROWDATA> >> </DATAPACKET> > > Thanks, Michael, > > Set to .DataSize... > > I'm ready for uploading this for inclusion in FPC, I can open a > bugreport and attach the patch if you're happy with that. Decided to upload it - I think it's a great improvement compared to the original code. Unfortunately that has more to do with my skills and other peoples' help, but well... better code is better code :)
Uploaded as issue 19987. Thanks, Reinier _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal