To edit an existing row in a Data Table, you need to locate the Data Row you want to edit, and then assign the updated values to the desired columns.If you don't know the index of the row you want to edit, use the Applications that use data-bound controls typically add new records through the Add New button on a Binding Navigator Control.To manually add new records to a dataset, create a new data row by calling the method on the Data Table.

If INSERT, UPDATE, or DELETE statements have not been specified, the method generates an exception.

However, you can create a Sql Command Builder or Ole Db Command Builder object to automatically generate SQL statements for single-table updates if you set the Select Command property of a . Then, any additional SQL statements that you do not set are generated by the Command Builder.

The following UPDATE statements result in different population increases for different countries in the NEWCOUNRTRIES table.

proc sql; update sql.newcountries set population=population*1.05 where name like 'B%'; update sql.newcountries set population=population*1.07 where name in ('China', 'Russia'); title "Selectively Updated Population Values"; select name format=$20., capital format=$15., population format=comma15.0 from sql.newcountries; Selectively Updated Population Values Name Capital Population ------------------------------------------------------ Brazil Brasilia 168,325,875 China Beijing 1,286,370,132 India New Delhi 929,009,120 Indonesia Jakarta 202,393,859 Russia Moscow 161,666,278 United States Washington 263,294,808 If you omit the ELSE clause, then each row that is not described in one of the WHEN clauses receives a missing value for the column that you are updating.

This happens because the CASE expression supplies a missing value to the SET clause, and the Population column is multiplied by a missing value, which produces a missing value.

While you are updating or inserting rows in a table, you might receive an error message that the update or insert cannot be performed.

This generation logic requires key column information to be present in the Data Set. After any data is loaded back into the Data Set, the On Row Updated event is raised, allowing the user to inspect the reconciled Data Set row and any output parameters returned by the command.

For more information see Generating Commands with Command Builders. After a row updates successfully, the changes to that row are accepted.

Data Public Class Main Class Shared Sub Main() Dim ds Users As New Data Set() dtm Users.