The following procedure updates a row in a table.
Do not update the primary key of a row: delete the row and add a new row instead.
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.
Enter update mode.
For example, the following instruction enters update mode on table tbl.
Set the new values for the row to be updated. For example, the following instruction sets the id column in the buffer to 3.
Execute the Update.
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.
After the update operation, the current row is the row that has been updated.
The UltraLite C++ API does not commit changes to the database until use the Commit method.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1|