WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

ADO Connection Object


Connection Object

The ADO Connection Object is utilized to make an open association with an information source. Through this association, you can get to and control a database.

If you need to get to a database on numerous occasions, you ought to build up an association utilizing the Connection object. You can likewise make an association with a database by passing an association string through a Command or Recordset object. In any case, this kind of association is beneficial for one explicit, single query.

ProgID

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

Properties

Property Description
Attributes Sets or returns the characteristics of a Connection object
CommandTimeout Sets or returns the quantity of seconds to pause while endeavoring to execute a command
ConnectionString Sets or returns the subtleties used to make an association with an information source
ConnectionTimeout Sets or returns the quantity of seconds to hang tight for an association with open
CursorLocation Sets or returns the area of the cursor service
DefaultDatabase Sets or returns the default database name
IsolationLevel Sets or returns the detachment level
Mode Sets or returns the supplier get to permission
Provider Sets or returns the supplier name
State Returns an esteem depicting if the association is open or closed
Version Returns the ADO adaptation number

Methods

Method Description
BeginTrans Begins another transaction
Cancel Cancels an execution
Close Closes a connection
CommitTrans Saves any progressions and closures the current transaction
Execute Executes an inquiry, explanation, strategy or supplier explicit text
Open Opens a connection
OpenSchema Returns blueprint data from the supplier about the information source
RollbackTrans Cancels any adjustments in the present exchange and finishes the transaction

Events

Note:  You can't deal with occasions utilizing VBScript or JScript (just Visual Basic, Visual C++, and Visual J++ dialects can deal with events).

Event Description
BeginTransComplete Triggered after the BeginTrans operation
CommitTransComplete Triggered after the CommitTrans operation
ConnectComplete Triggered after an association starts
Disconnect Triggered after an association ends
ExecuteComplete Triggered after an order has completed executing
InfoMessage Triggered if a notice happens amid a ConnectionEvent operation
RollbackTransComplete Triggered after the RollbackTrans operation
WillConnect Triggered before an association starts
WillExecute Triggered before a direction is executed

Collections

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