ComponentOne DataObjects for .NET
Update Process on the Server
DataObjects for .NET (Enterprise Edition) > Updating the Database > Update Process on the Server

Both in 2-tier and in 3-tier configurations, each update request is executed as a database transaction, that is, either all changes are successfully committed to the database or no changes are committed to the database. If a schema contains multiple database connections, a separate transaction is used for each database connection, all the transactions committed or rolled back together when all updates are done.

For each modified simple table, DataObjects for .NET applies updates in a certain order: it processes added rows first, then deleted rows, followed by modified rows. So, it first inserts rows that must be added, and then deletes rows that must be deleted, before modifying rows that must be changed. For each row involved, DataObjects for .NET applies the update by executing a generated SQL statement (in case of a bound table), see Generated SQL Statements. This cycle repeats for each simple table whose rows must be updated.

After a successful update, the updated and added rows are retrieved from the database to refresh the data according to the latest database state. This is necessary because the database can change the data, set default values, and so on. The process of refreshing rows after update can be customized with properties and events as well as the update process; for more information, see Generated SQL Statements and Changing Data as a Result of Update (Refresh).