Merging two different datasets

  • Thread starter Thread starter Oriane
  • Start date Start date
O

Oriane

Hi,

I'm currently coding a simple project. The goal is to update an Sql database with chosen rows of Excel files. I could use of course DTS but that's not the client choice.

I wonder whether it's possible to use two different dataset, I mean physically different (with sqlDataAdapters connected to the two different databases, but logically equivalent.

Does the "Merge" method could fit into my requirements ?

Or could I try an Xlst transformation betwwen the 2 datasets ? If this solution works out, how can I simply make this transformation with VS 2003 ? Is there graphical tools for that (like with the BizTalk Xlst editor) ?

Oriane
 
Yes, Merge will let you do this job. just make sure the structures of your
datasets are exactly parallel and if you are not handling constraint errors
yourself, then the data in each data source has to be a perfect complement
of each other.

Alternatively, you can read from the Excel using OleDb, into a dataset, and
persist that line by line into the Sql database.

Although, ADO.NET will never be as fast as DTS/BCP (with the exception of
SqlBulkCopy but that's ADO.NET 2.0)

- Sahil Malik
http://codebetter.com/blogs/sahil.malik/



Hi,

I'm currently coding a simple project. The goal is to update an Sql database
with chosen rows of Excel files. I could use of course DTS but that's not
the client choice.

I wonder whether it's possible to use two different dataset, I mean
physically different (with sqlDataAdapters connected to the two different
databases, but logically equivalent.

Does the "Merge" method could fit into my requirements ?

Or could I try an Xlst transformation betwwen the 2 datasets ? If this
solution works out, how can I simply make this transformation with VS 2003 ?
Is there graphical tools for that (like with the BizTalk Xlst editor) ?

Oriane
 
Back
Top