2.2.13. ADO Connection object

发布时间 : 2025-10-25 13:35:19 UTC      

Page Views: 9 views

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.

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。