Connection Object

The Connection object represents a single connection to the underlying data provider. As such, the Connection object maintains information about that data provider. In the context of a web application, it represents one connection from the web server to a database server. As with the other ActiveX Data Objects, your ability to use any of the Connection object's methods or properties is directly dependent on the underlying data provider's support for the feature. Table 12.5, Table 12.6, Table 12.7, and Table 12.8 list the Connection object's properties, collection objects, methods, and events respectively.

Table 12.5. Connection Object Properties

Property

Description

Attributes

The value of the Attributes property of the Connection object represents the characteristics for the object. Use the Attributes property to set whether the Connection object performs retaining commits or retaining aborts. This Long value is read/write.

CommandTimeout[6]

The number of seconds the Connection should wait for the result of a call to the Execute method before raising an error. The default value is 30 seconds.

ConnectionString[6]

A string containing the information for the current connection. This string contains the definition of the Provider, Data Source, User Id, Password, File Name (for a provider-specific file), Remote Provider, and remote Server.

ConnectionTimeout[6]

The number in seconds to wait while attempting to make a connection using the ConnectionString ...

Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.