Partager via


DeleteRecord Method

Deletes a the entity represented by a Record.

Syntax

Record.DeleteRecord Source, Async

Parameters

  • Source
    Optional. A String value that contains a URL identifying the entity (for example, the file or directory) to be deleted. If Source is omitted or specifies an empty string, the entity represented by the current Record is deleted. If the Record is a collection record (RecordType of adCollectionRecord, such as a directory) all children (for example, subdirectories) will also be deleted.
  • Async
    Optional. A Boolean value that, when True, specifies that the delete operation is asychronous.

Remarks

Operations on the object represented by this Record may fail after this method completes. After calling DeleteRecord, the Record should be closed because the behavior of the Record may become unpredictable depending upon when the provider updates the Record with the data source.

If this Record was obtained from a Recordset, then the results of this operation will not be reflected immediately in the Recordset. Refresh the Recordset by closing and re-opening it, or by executing the Recordset Requery, or Update and Resync methods.

Note   URLs using the http scheme will automatically invoke the Microsoft OLE DB Provider for Internet Publishing. For more information, see Absolute and Relative URLs.

See Also

Delete Method (ADO Fields Collection) | Delete Method (ADO Parameters Collection) | Delete Method (ADO Recordset)

Applies To: Record Object