dataset 2 database

  • Thread starter Sjaakie Helderhorst
  • Start date
S

Sjaakie Helderhorst

Hello,

I have this webservice which receives a dataset.
This dataset contains a table 'playlist'. This table is identical to a table
in my SQL Server (identical cell-names).
Is it possible to do a 'simple' INSERT command and transfer all data from
this dataset to the database? Or need I loop through al records in the
dataset? Since it is possible to fetch to a dataset using a datadapter, it
seems obvious to me to insert into the database likewise.

I've been searching for some docs all afternoon (Google) without any luck.

Thanks in advance
 
S

Sjaakie Helderhorst

Suresh said:
SqlDataAdapter.Update(....) method will do what you are trying to do. Check out this sample.

http://samples.gotdotnet.com/quickstart/howto/doc/adoplus\UpdateDataFromDB.aspx

HTH,
Suresh.

----- Sjaakie Helderhorst wrote: -----

Is it possible to do a 'simple' INSERT command and transfer all data from
this dataset to the database? Or need I loop through al records in the
dataset? Since it is possible to fetch to a dataset using a datadapter, it
seems obvious to me to insert into the database likewise.

Thanks Suresh,
This method requires a SELECT first, then merge the datarows (which I
manually have to fetch from the dataset) and then update the database. So I
think doing a INSERT right away would be a faster solution... but I'll give
it a try, since things don't always are the way they look...
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top