G
Guest
I am new C## Ado.net user coming from a VB old style ADO environment.
Here is my situation. I have a desktop app that uses MSDE as its
database. I need the ability for a user on one computer to export some
data out of couple of tables and import them into another users computer.
This has to to happen in a disconnected way so using DTS is not an option.
From my limited ADO.net experience I hoped that I could do the following.
1)Use the SQLAdapter to query the tables from the Source computer and create
a DataSet.
2) Use the WriteXML method on the DataSet to create a XML file that contains
the data.
3)On the target computer create a dataset and use the readXML method to
import xml file that contains the data.
4)Create a SQLDataAdapter on the Target computer
5)Modify the keys on the data to avoid any primary key violations.
6) Pass the dataset with the data to be imported into SQLDatadapter using
the Update method to write to the database.
So far I have I have done steps 1-3 successfully. I have not had much
success with steps 4-6.
So has anyone does something similar to this? Do the steps make sense or
should I be doing something different? If you know of any examples of how to
do this please let me know where I can find them.
Thanks in Advance
Here is my situation. I have a desktop app that uses MSDE as its
database. I need the ability for a user on one computer to export some
data out of couple of tables and import them into another users computer.
This has to to happen in a disconnected way so using DTS is not an option.
From my limited ADO.net experience I hoped that I could do the following.
1)Use the SQLAdapter to query the tables from the Source computer and create
a DataSet.
2) Use the WriteXML method on the DataSet to create a XML file that contains
the data.
3)On the target computer create a dataset and use the readXML method to
import xml file that contains the data.
4)Create a SQLDataAdapter on the Target computer
5)Modify the keys on the data to avoid any primary key violations.
6) Pass the dataset with the data to be imported into SQLDatadapter using
the Update method to write to the database.
So far I have I have done steps 1-3 successfully. I have not had much
success with steps 4-6.
So has anyone does something similar to this? Do the steps make sense or
should I be doing something different? If you know of any examples of how to
do this please let me know where I can find them.
Thanks in Advance