2.2.13. ADO Connection object

发布时间 :2025-10-25 12:23:20 UTC      

Connection object

ADO Connection object is used to create an open connection to a data source. Through this connection, you can access and manipulate a database.

If you need to access a database multiple times, you should use the Connection object to establish a connection. You can also go through a Command or Recordset object passes a connection string to create a connection. However, such joins are only suitable for a specific and simple query.

ProgID

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

Attribute

Attribute

Description

Attributes

Set or return Connection properties of the object.

CommandTimeout

Indicates the amount of time to wait during command execution before terminating the attempt and generating an error.

ConnectionString

Sets or returns details used to establish a connection to the data source.

ConnectionTimeout

Indicates the time to wait during connection establishment before terminating the attempt and generating an error.

CursorLocation

Sets or returns the location of the cursor service.

DefaultDatabase

Indication Connection the default database for the.

IsolationLevel

Indication Connection the isolation level of the object.

Mode

Set or return provider the access rights.

Provider

Set or return Connection the name of the object provider.

State

Returns a value that describes whether the connection is open or closed.

Version

Returns the version number of the ADO.

Method

Method

Description

BeginTrans

Start a new transaction.

Cancel

Cancel an execution.

Close

Close a connection.

CommitTrans

Save any changes and end the current transaction.

Execute

Execute a query, SQL statement, stored procedure, or provider specific text.

Open

Open a connection.

OpenSchema

From provider object about the data source schema information.

RollbackTrans

Cancels any changes made in the current transaction and ends the transaction.

Event

Note: you cannot use VBScript or JScript to handle events (you can only handle events using the Visual Basic, Visual C++, and Visual jacks + languages).

Event

Description

BeginTransComplete

In BeginTrans triggered after the operation.

CommitTransComplete

In CommitTrans triggered after the operation.

ConnectComplete

Triggered after the start of a connection.

Disconnect

Triggered after the end of a connection.

ExecuteComplete

Triggered after the execution of a command.

InfoMessage

If you are in a ConnectionEvent the event is triggered when a warning occurs during the operation.

RollbackTransComplete

In RollbackTrans triggered after the operation.

WillConnect

Triggered before a connection starts.

WillExecute

Triggered before a command is executed.

Set

Set

Description

Errors

All Error objects that contain Connection objects.

Properties

All Property objects that contain Connection objects.

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.