編輯

共用方式為


State property (ADO)

Applies to: Access 2013, Office 2013

Indicates for all applicable objects whether the state of the object is open or closed.

Indicates for all applicable objects executing an asynchronous method, whether the current state of the object is connecting, executing, or retrieving.

Return value

Returns a Long value that can be an ObjectStateEnum value. The default value is adStateClosed.

Remarks

You can use the State property to determine the current state of a given object at any time.

The object's State property can have a combination of values. For example, if a statement is executing, this property will have a combined value of adStateOpen and adStateExecuting.

The State property is read-only.