Creating, Modifying, and Deleting Records |
The following methods and actions can be used to update an external data source. Note that Newlook will only support updates to the data source when the data source provider allows such updates. Available methods and Actions:
UseTIPIn the following use notes we have used the scripting methods however the corresponding macro actions can be substituted in their place. The DBConnect method establishes the physical connection to the data source. After this action successfully completes, the connection is live and you can issue commands against it and process the results. The Open method opens a recordset of the live connection. The AddNew method sets the EditMode property of the Recordset to EditAdd. Any subsequent changes to the new record are cached locally. If you call the AddNew method while editing the current record or while adding a new record, the Update method is called to save any changes before the new record is created. The Update method posts the new record to the database or saves any changes to the current record of a Recordset object and resets the EditMode property of the recordset to EditNone. The cursor position remains unchanged after calling this method. You cannot cancel changes to the current record or a new record after you call the Update method, unless the changes are part of a transaction that you can roll back with the RollbackTrans method. The CancelUpdate method deletes the new record or discards any locally cached changes and resets the EditMode property to EditNone. If you are adding a new record when you call CancelUpdate, the current record becomes the record that was current before the AddNew method. If you are in Edit mode and want to move off the current record (for example, with Move or Seek), you can use CancelUpdate to cancel any pending changes. The Delete method sets the EditMode property of the recordset to EditNone if it is successful. Retrieving field values from a deleted record returns an error value. After deleting the current record, it remains current until you move to a different record. Once you move away from the deleted record, it is no longer accessible. If you nest deletions in a transaction, you can recover deleted records with the RollbackTrans method. When outstanding updates have been made to a record but have not been applied with Update or aborted with CancelUpdate, methods that attempt to change the current record (such as Move) will fail. Any changes must be applied or canceled before moving to another record. If an edit is in progress, the Close method generates an error; instead, call the Update method or CancelUpdate method first. When you have concluded your operations over an open Connection, use the Close method to terminate the connection and free any associated system resources.
Refer to individual methods and actions in the Reference section of help for detailed examples. See Also |
|||||||||||||||
|