Mismatch in datapacket (XML in Unidac vs ClientDataset)

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kribo
Posts: 12
Joined: Thu 13 May 2010 15:51

Mismatch in datapacket (XML in Unidac vs ClientDataset)

Post by kribo » Thu 13 May 2010 16:19

Hi :D ,

I'm testing data sharing between UniDAC dan ClientDataset.
I perform simple Query using TUniQuery then save the result (not empty
and only a few rows) using method SaveToXML to a path of 'C:\DATA.xml'.

When I open a ClientDataset with Filename property set to the above path,
the process returns message 'Mismatch in datapacket'

Can this be resolved? I really need this scenario to work :roll:...TIA

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Fri 14 May 2010 15:02

Hello

UniDAC components and ClisentDataSet save data to the XML format in the different XML structure. If you want to save data from UniQuery to the XML format and load it by ClientDataSet then you should connect ClientDataSet to UniQuery and call the SaveToFile method of the ClientDataSet. In this case data will be stored in the XML format it the structure that can be read by ClientDataSet. If you don't want to use ClientDataSet to save data to the XML format, then you can save data by UniQuery.SaveToXML method but in this case you should write own XML converter from the UniDAC XML format to the ClientDataSet XML format.

kribo
Posts: 12
Joined: Thu 13 May 2010 15:51

Post by kribo » Fri 14 May 2010 16:55

Hello again

You're right. Now I understand both are using different XML structure and,
it seems there's really no hope to avoid DatasetProvider :lol:
I was just curious if both could share/exchange data independently
(inter-process communication). Anyway, thanks a lot for the reply.

Post Reply