[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2929
  • Last Modified:

DataAdapter in VB.net

when this code is used.
DataAdapter.update(dataset)

does it update just the data that has been retrieved to the dataset, or does it update the data located in the database also?

0
jskfan
Asked:
jskfan
  • 2
1 Solution
 
harris_cCommented:
The dataset.

hec",)
0
 
harris_cCommented:
Both.

The dataset is updated, then commited to database.



http://msdn2.microsoft.com/en-us/library/system.data.common.dataadapter.update.aspx

When using Update, the order of execution is as follows:

   1.     The values in the DataRow are moved to the parameter values.
   2.     The OnRowUpdating event is raised.
   3.     The command executes.
   4.     If the command is set to FirstReturnedRecord, then the first returned result is placed in the DataRow.
   5.     If there are output parameters, they are placed in the DataRow.
   6.     The OnRowUpdated event is raised.
   7.     AcceptChanges is called.


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconupdatingdatabasewithdataadapterdataset.asp
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

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