TClientDataset: Field type not supported for XML.

I have a bunch of data loaded into TClientDataset representing an array of complex objects. But when I try to run

Dataset.SaveToFile('c:\test.xml', dfXMLUTF8);

      

he doesn't like it:

Project testing.exe raised the EDBClient exception class with the message "Field type not supported for XML".

This is much less useful than it should be, for two reasons. First, it doesn't say which field or what type of field is not supported, and secondly, the actual saving happens inside the black box DLL.

The only field types I use in this dataset are integers, strings, booleans, and multiple TArrayFields, which contain arrays of integer fields. Nothing I would expect would be difficult to serialize. Does anyone know why this is not working?

0


source to share


2 answers


Are all or only some of the fields saved? Maybe for example TArrayFields are throwing an exception? Try deleting different types of fields one by one and see when things start working.



+1


source


This assumes array fields are not supported in the XML export, but you should check.

Go to Project Options → Compiler and enable Use Debug DCUs. Rebuild.



Set a breakpoint on the SaveToFile () call. Launch.

Then you can go into the VCL source and try to find what is not supported.

0


source







All Articles