Close (ADO)

Use the Close method to close a Recordset object to free any associated system resources.

Syntax

object.Close

The object placeholder an object expression that represents an open Recordset.

Remarks

Closing an object does not remove it from memory; you may change its property settings and open it again later. To completely eliminate an object from memory, set the object variable to Nothing.

Using the Close method to close a Recordset object releases the associated data and any exclusive access you may have had to the data through this particular Recordset object. You can later call the Open method to reopen the recordset with the same or modified attributes. While the Recordset object is closed, calling any methods that require a live cursor generates an error.

If an edit is in progress while in immediate update mode, calling the Close method generates an error; call the Update or CancelUpdate method first.

If you use the Clone method to create copies of an open Recordset object, closing the original or a clone does not affect any of the other copies.