A list of products available on this site
Documentation for XtraMania's xtras
Prices and links to the online store
Xtras, PDFs, samples
Have a question? Ask us!
Contacts
Logo. www.xtramaina.com  
Home Search E-mail
ADOxtra Reference/rst.Delete()

rst.Delete()

Syntax

bSuccess=rst.Delete_(affectRecords)

Note an underscore after the Delete word. Lingo processes delete keyword on its own, therefore the underscore is necessary to invoke Delete method of the wrapped object.

Parameters

affectRecords
Optional. An Integer value that determines how many records the Delete method will affect. The default value is adAffectCurrent. It can be one of AffectEnum values.

Returns

True (1) if function completed successfully, false (0) otherwise.

Description

Calls the Delete() method of the wrapped ADODB.Recordset object.
Using the Delete method marks the current record or a group of records in a Recordset object for deletion. If the Recordset object doesn't allow record deletion, an error occurs. If you are in immediate update mode, deletions occur in the database immediately. If a record cannot be successfully deleted (due to database integrity violations, for example), the record will remain in edit mode after the call to Update. This means that you must cancel the update with CancelUpdate before moving off the current record (for example, with Close, Move).
If you are in batch update mode, the records are marked for deletion from the cache and the actual deletion happens when you call the UpdateBatch method. (Use the Filter property to view the deleted records.)
Retrieving field values from the deleted record generates an error. After deleting the current record, the deleted record 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. If you are in batch update mode, you can cancel a pending deletion or group of pending deletions with the CancelBatch method.
Not supported in ADOxtraLite version.

Site homeSearchContact author © Eugene Shoustrov. www.xtramania.com