Understanding UltraLite.NET Development
Accessing and manipulating data with the Table API
The following procedure updates a row.
To update a row
Move to the row you wish 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 t.
t.BeginUpdate();
Set the new values for the row to be updated. For example, the following instruction sets the id column in the buffer to 3.
t.SetInt( id , 3);
Execute the Update.
t.Update();
After the update operation the current row is the row that has been updated. If you changed the value of a column in the index specified when the Table object was opened, the current row is undefined.
By default, UltraLite.NET operates in autocommit mode, so that the update is immediately applied to the row in permanent storage. If you have disabled autocommit mode, the update is not applied until you execute a commit operation. For more information, see Transaction processing in UltraLite.
| Caution You cannot update the primary key of a row: delete the row and add a new row instead. |
SQL Anywhere Studio 9.0.2
Copyright © 1989–2004 Sybase, Inc. Portions copyright © 2001–2004 iAnywhere Solutions, Inc. All rights reserved.