compare from xml
Querton
Posts: 11
Good morning,
I'm facing an easy (I hope it's easy) little issue. I need to compare the data that are in a XML file to a database. How can I do that ?
In other words, how can I connect the toolkit to a XML file (includes schema & data) that has been generated from a dataset.writexml method ?
Is there a way to cast a dataTable to a RedGate Table ?
I'm currently thinking to re create a new db from my xml file then start the comparision between this db and the target one.... but it's a bit tricky no ? I hope that there are others solutions
Thanks in advance
Regards
Pierre
I'm facing an easy (I hope it's easy) little issue. I need to compare the data that are in a XML file to a database. How can I do that ?
In other words, how can I connect the toolkit to a XML file (includes schema & data) that has been generated from a dataset.writexml method ?
Is there a way to cast a dataTable to a RedGate Table ?
I'm currently thinking to re create a new db from my xml file then start the comparision between this db and the target one.... but it's a bit tricky no ? I hope that there are others solutions
Thanks in advance
Regards
Pierre
This discussion has been closed.
Comments
I'm sure that this is possible, but I do not know exactly how. Since SQLDataCompare.Engine.Table derives from System.Data.SqlClient.Table, it should be possible to construct a New SQLDataCompare.Engine.Table and feed the data into it from your DataSet.Table.
There is another fellow in the forum who had done something similar with a SQLCompare.Engine.Table: maybe his example code can help?
http://www.red-gate.com/MessageBoard/vi ... php?t=1082
I have to admit that I don't enough knowledges in C# & comparison tool. Because I've not completly understood the example that you gave me.
But I've tryed to use it to be able to create from scratch a SQLDataCompare.Table object regarding my table in my dataset. And it works ! Thanks
But now I've several issues:
1) How to populate with the data in that new table with what I have in my dataset ?
2) How to insert my new table in a SQLDataCompare.Tables collection, beause I don't see any Add() Method...
Thanks a lot for your last quick responds
pierre
Thanks for your support and quick answers.
That's too bad.. I've request my company to buy the toolkit on purpose for this.. next time I'll read more carefully the possibilities of 3rd party tools (my fault...)
Nevermind, I think I can still use the powerfull of the toolkit by recreating a temporary db and fill the data from the xml file. Then compare the 2 db.
It will be a bit tricky but it'ok ....
I think it could be a good think to be able to compare a db vs dataset or 2 dataset with the toolkit. isn't it ?
Thanks again
pierre
We are looking into the possibility of adding snapshots to Data Compare the same as SQL Compare. Pending a feasability study and some test cases, they might appear in Data Compare 4. (Of course no promises from me, though!!)
That's sounds to be a really nice thing
When it's plan to be released ?
Regards