ComponentOne DataObjects for .NET
Update() Method

C1.Data.2 Assembly > C1.Data Namespace > C1DataSet Class > Update Method : Update() Method
Updates (commits) all changed data set rows to the database.
Syntax
'Declaration
 
Public Overloads Sub Update() 
public void Update()
Remarks
Update method without parameters updates the whole data set.

Update method with tableNames parameter updates only changes in the tables listed in tableNames. The tableNames parameter must contain a list of simple tables (not composite tables or table views).

Update method with tableNames parameter does not allow updating a table that is used in a composite table as a main constituent table (is connected to its parent in the composite table diagram with a one-to-many relation; the restriction does not apply to those connected many-to-one). If this restriction is not satisfied, the method throws an exception. In such case, always use Update without parameters to update the whole data set.

An unsuccessful update, including one resulting in an exception, triggers UpdateError event. If user code sets the event's Status argument to Continue, an update attempt is made again. This loop continues until either the update succeeds or UpdateError event code does not set Status to Continue. See "Handling Update Errors on the Client" for details.

See Also

Reference

C1DataSet Class
C1DataSet Members
Overload List