newbie question.

  • Thread starter Thread starter Jensen Bredal
  • Start date Start date
J

Jensen Bredal

Hello,
I have backed up a table from a database in an DataTable (dt ) object.


The table has been wiped up (in sql server) after the backup but i still
have the copy in memory (in my DataTable object ).
now i need to restore the table from memory.

Is there a quick way of doing this apart from a row by row insert?

I'm not using typed dataset.

Many thanks in advance

JB
 
There are quite a few ways of handling this, depending on how you want to
tackle it. Row by row is an option. Another option is transforming the XML
from the DataSet into a diffgram or updategram and sending to the database.
You can also send the XML into a stored procedure (as a string) and use
OPENXML. It is possible to set up a DataAdapter and send the info back via
UPDATE. It will still loop through data, although you will simply call
Update() on the dataAdapter.


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
option. Another option is transforming the XML
from the DataSet into a diffgram or updategram and sending to the database.
You can also send the XML into a stored procedure (as a string) and use


Many thanks, could you provide some code for the any of the options.?

I'm a few hours away from my deadline and i'm getting more and more
stressed ;).

I have written a stored procedure that does the insert job ..
 
Back
Top