Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » UltraLite - C and C++ Programming » Application development » UltraLite C++ application development » Data creation and modification using the ULTable class

 

Updating rows

Use the Update method to update a row in a table.

Prerequisites

There are no prerequisites for this task.

 Task
  1. Move to the row you want to update.

    You can move to a row by scrolling through the table or by searching the table using find and lookup methods.

  2. Enter update mode.

    For example, the following instruction enters update mode on table tbl.

    tbl->UpdateBegin();
  3. Set the new values for the row to be updated. For example, the following instruction sets the id column in the buffer to 3.

    tbl->SetInt("id", 3);
  4. Execute the Update.

    tbl->Update();
    Caution

    When using the Find and Update methods, your pointer may not be in the expected position after updating a column that is involved in the search criteria. In some instances, it is recommended that you use a SQL statement when updating several rows.

Results

After the update operation, the current row is the row that has been updated.

Next

Perform additional SQL operations on the database and then execute the Commit method to commit changes to the database. executed.

 See also