ADO 연결 개체


연결 개체

ADO 연결 개체는 데이터 원본에 대한 열린 연결을 만드는 데 사용됩니다. 이 연결을 통해 데이터베이스에 액세스하고 조작할 수 있습니다.

데이터베이스에 여러 번 액세스하려면 Connection 개체를 사용하여 연결을 설정해야 합니다. Command 또는 Recordset 개체를 통해 연결 문자열을 전달하여 데이터베이스에 연결할 수도 있습니다. 그러나 이러한 유형의 연결은 하나의 특정 단일 쿼리에만 적합합니다.


ProgID

set objConnection=Server.CreateObject("ADODB.connection")

속성

Property Description
Attributes Sets or returns the attributes of a Connection object
CommandTimeout Sets or returns the number of seconds to wait while attempting to execute a command
ConnectionString Sets or returns the details used to create a connection to a data source
ConnectionTimeout Sets or returns the number of seconds to wait for a connection to open
CursorLocation Sets or returns the location of the cursor service
DefaultDatabase Sets or returns the default database name
IsolationLevel Sets or returns the isolation level
Mode Sets or returns the provider access permission
Provider Sets or returns the provider name
State Returns a value describing if the connection is open or closed
Version Returns the ADO version number


행동 양식

Method Description
BeginTrans Begins a new transaction
Cancel Cancels an execution
Close Closes a connection
CommitTrans Saves any changes and ends the current transaction
Execute Executes a query, statement, procedure or provider specific text
Open Opens a connection
OpenSchema Returns schema information from the provider about the data source
RollbackTrans Cancels any changes in the current transaction and ends the transaction

이벤트

참고:   VBScript 또는 JScript를 사용하여 이벤트를 처리할 수 없습니다(Visual Basic, Visual C++ 및 Visual J++ 언어만 이벤트를 처리할 수 있음).

Event Description
BeginTransComplete Triggered after the BeginTrans operation
CommitTransComplete Triggered after the CommitTrans operation
ConnectComplete Triggered after a connection starts
Disconnect Triggered after a connection ends
ExecuteComplete Triggered after a command has finished executing
InfoMessage Triggered if a warning occurs during a ConnectionEvent operation
RollbackTransComplete Triggered after the RollbackTrans operation
WillConnect Triggered before a connection starts
WillExecute Triggered before a command is executed

컬렉션

Collection Description
Errors Contains all the Error objects of the Connection object
Properties Contains all the Property objects of the Connection object