We help IT Professionals succeed at work.

How we can update  Database Tables using Adapter from DataSet

Mike Treat
Mike Treat asked
on
I am woking on webservice in .net. My problem is that, from client side i am sending
a Dataset which contains two Datatables. I want to update these two Datatables in to
two tables in the Database in server.

Now i am using a methods like  going through each row and updating one by one to Database.

I am searching for another effiecient method using adapter. Is there is any way to update
these Datatables into Databse Tables using Adapter ??

Comment
Watch Question

Commented:
Right click to toolbar
choose "Choose Items"
find SqlDataAdapter on the list. Select it. Close the dialog.
Drag and drop it on to the form.
Follow the wizard and configure the adapter
then
in a try catch block call update function of the dataadapter

SqlDataAdapter1.update(dt1)


place another sqldataadapter and configure it so that it will connect the next table.
and call the update for the second datatable

SqlDataAdapter2.update(dt2)
Forced accept.

Computer101
EE Admin

Explore More ContentExplore courses, solutions, and other research materials related to this topic.