Visual Basic: RDO Data Control

UpdateRow Method (Remote Data)

See Also    Example    Applies To

Saves the current values of bound controls to the database.

Syntax

object**.UpdateRow**

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

Use this method to save the current contents of bound controls to the database during the Validate event, but without triggering the Validate event again. You can use this method to avoid triggering the Validate event. Using this method avoids a cascading event.

The UpdateRow method has the same effect as executing the Edit method, changing a column, and then executing the Update method, except that no events occur.

Note   When you use the ClientBatch cursor library, all updates to the base tables are deferred until you use the BatchUpdate method. In this case, the UpdateRow method updates the local rdoResultset, but does not update the base tables. These changes can be lost if the application ends before the BatchUpdate method has been completed.

Whenever you attempt to update a row in the database, any validation rules must be satisfied before the row is written to the database. In the case of Microsoft SQL Server, these rules are established by Transact SQL defaults, rules, and triggers written to enforce referential and data integrity.

An update may not occur because of any of the following reasons, which can also trigger a trappable error:

  • The page containing the row or the row itself is locked.

  • The database or rdoResultset object****isnt updatable.

  • The user doesnt have permission to perform the operation.