• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 613
  • Last Modified:

How we can update Database Tables using Adapter from DataSet

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 ??

0
Mike Treat
Asked:
Mike Treat
1 Solution
 
dampseyCommented:
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)
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now