State Property

The State property on a Connection, Command, Recordset object describes the current state of an object. This property sets or returns a Long value.

oldState = currentConnection.State
currentConnection.State = adStateClosed
 

Remarks

The State property is used to set or return the current state of an object. The value of the State property can be one of the following enumerated values:

Enumeration Value Description
adStateClosed 0 This value indicates that the object is closed. This is the default value.
adStateOpen 1 This value indicates that the object is closed.

The State property can be used to determine the current state of a given object at any time.