Copying a row of data from one server to another

  • Thread starter Thread starter RSH
  • Start date Start date
R

RSH

Is there an easy way to copy a database row from one table to the same table
on another SQL server using C#?

The only way I am really aware of involves looping through the fields which
is okay but it seems a bit over kill for a simple datarow transfer.

Thanks,
Ron
 
If the databases have exactly the same structure, can't you do

dataTblDest.rows.add(dataTblSrc.rows[sourceIndex])

?? It all depends how you are accessing your data though... I would use
prepared SQL statements (ie, the "hard" way) if it was something to be done
many times or very often.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top