Reading an XML file to a Dataset and then from Dataset to SQLServer
-
I am doing the folowing operations: 1. Export some tables (that have unique IDs and foreign keys) to an XML file using a DataSet object in .NET. This works file. 2. I want to be able to import that XML file into another SQLServer server that has the same database architecture, but of course, different data. 3. When reading the XML file into a Dataset and then updating the database, some key violations or duplicate records may occur because I exported some unique IDs from one databse server and am trying to import them into another server. Thus, when importing a master table, I must read the XML file and give the corresponding records new IDs accordingly. Since my master table will have several slave tables with foreign keys involved I would have to udpate the slave tables also to maintain the integrity. I could do all that manually by having lots of structures and maps and hash tables. Is there a change .NET Dataset would take care of everything automatically for me? Thanks. Best regards, Alexandru Savescu