ADO 상태 속성
❮ 완전한 명령 개체 참조
State 속성은 개체가 열려 있는지, 닫혀 있는지, 연결 중인지, 실행 중인지 또는 데이터를 검색하고 있는지를 설명하는 값을 반환합니다. 값은 ObjectStateEnum 값을 반환합니다 . 기본값은 adStateClosed입니다.
이 속성은 Command , Connection , Record , Recordset 및 Stream 개체와 함께 사용할 수 있습니다.
State 속성은 값의 조합을 가질 수 있습니다. 명령문이 실행 중인 경우 이 속성은 adStateOpen 및 adStateExecuting의 결합된 값을 갖습니다.
통사론
object.State
예 - 명령 개체의 경우
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"
set comm=Server.CreateObject("ADODB.Command")
response.write(comm.State)
conn.close
%>
예 - 명령 개체의 경우
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"
response.write(conn.State)
conn.close
%>
ObjectStateEnum 값
개체가 열려 있는지 닫혀 있는지, 데이터 원본에 연결하거나, 명령을 실행하거나, 데이터를 검색하는지 지정합니다.
Constant | Value | Description |
---|---|---|
adStateClosed | 0 | The object is closed |
adStateOpen | 1 | The object is open |
adStateConnecting | 2 | The object is connecting |
adStateExecuting | 4 | The object is executing a command |
adStateFetching | 8 | The rows of the object are being retrieved |
❮ 완전한 명령 개체 참조