Home All Groups Group Topic Archive Search About
Author
30 Nov 2004 3:07 PM
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

Author
30 Nov 2004 3:59 PM
Cowboy (Gregory A. Beamer) - MVP
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!
***************************

Show quoteHide quote
"Jensen Bredal" wrote:

>
> 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
>
>
>
>
>
Are all your drivers up to date? click for free checkup

Author
30 Nov 2004 4:15 PM
Jensen Bredal
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 ..

Bookmark and Share