Updating (inserting) into database

L

Leszek Gruszka

I made connection with sql2000. I'm collecting data from database/table
(name - "Base1").
Then I'm transposing it. All is in dataset, by dataadapter etc.
I'm trying to write values to new table in the same database (name -
"Base2").
Is there any posibility to write it by UPDATE, INSERT or something like
this?
Maybe i must read and write every row from dataset, but i don't know what
names will columns have....
 
W

W.G. Ryan eMVP

Fill the dataset with an adapter that has its AcceptChangesDuringFill
property to false. When you call fill, provided this property is set to
false, all of the rows will have a rowstate marked as Inserted. Then just
call Update with the second adapter.
 

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

Top