[fpc-pascal] Patch: new XML export for FCL-DB ready for inclusion, issue 19790 - includes Delphi Clientdataset

Reinier Olislagers reinierolislagers at gmail.com
Thu Jul 28 06:34:47 CEST 2011


On 27-7-2011 20:49, Ludo Brands wrote:
>>
>> Update: includes first stab at Delphi Clientdataset. Please 
>> test with various datatypes as I haven't been able to map all 
>> of them...
>>
> 
> Some problems with Delphi Clientdataset:
> 
> -<METADATA> comes after <ROWDATA> and Delphi 2006 complains about missing
> metadata. Inverting the 2 blocks solves the problem. Moved the <METADATA>
> block from 2555 to 2462 
I'll look into that.
> 
> - datetime and timestamp are missing time part as mentioned in the comments.
> 
> Formatdatetime('yyyymmdd"T"hh:nn:ss', EF.Field.AsDateTime) solves that.
I'll look into that.
> 
> - bcd: invalid field type 
Ok, what field type do we need ;) I'll wait for your further investigations.
> 
> - the mysql text types (tinytext,text, longtext, etc) are exported as
> bin.hex with subtype binary. Perhaps a problem in the mysql code. 
Ok.
Am looking at test coverage, might be a good idea for medium term to use
current sqldb testing framework so we can use eg Firebird employee
sample database or an mysql database.
For now, I'll wait for your further investigations.
> 
> - when a string field contains the > character, the row is not imported but
> the previous one is duplicated. 
Strange, shouldn't this be handled by the XML export code?
> 
> -Delphi has the dfXMLUTF8 and dfXML format for exporting data but no way to
> specify this for reading. The difference is in the first line:
> encoding="UTF-8". 
Was afraid of that. FCL XML has no support for specifying encoding. I
might need to add a bug and a hackish workaround (if possible, opening
the XML file we just created and rewriting the first line)
> 
> I'll investigate further and let you know by tomorrow.
> 
> Ludo
Hi Ludo,

https://bitbucket.org/reiniero/fpc_laz_patch_playground/issue/2/delphi-createdataset-issues

Thanks, looking forward to your results...



More information about the fpc-pascal mailing list