Function DbAppend() Professional

Inserts a record into a table

Description

DbAppend() will flag a forthcoming INSERT INTO but does not insert a record immediately. The record will be inserted with the next database operation, like a navigation, DbAppend() etc. If the inserted data violates server-side constraints, the error will be posted within the deferred operation. To correct the error, callDbRRollback() and retry the complete append sequence.

DbAppend() takes care of non-nullable and non-updatable columns automatically. However, using DbAppend() might require to assign a valid value to more than one field before executing the next operation.

// Don't use this pattern 
DbAppend() 
field->A := "value for field A" 
DbGoTop() 
DbGoBottom() 
field->B := "value for field B" 

The pattern described above is a typical pattern used by TBrowse()-based browsers and will fail if there are columns with server-side constraints. Additionally, it cannot be assumed that a new record is placed at a specific position (record number).

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.