Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

ADO Connection Object

A Connection object represents an open connection to a data source.

ADO Connection Object Collections

ADO Errors Collection

Contains all stored Error objects that pertain to an ADO operation.

ADO Properties Collection

All Property objects for a specific instance of a Connection object. This collection is not currently supported on UNIX.

ADO Connection Object Methods

ADO Connection Object BeginTrans, CommitTrans, and RollbackTrans Methods

Begins a new database transaction within a Connection object.

ADO Connection Object Close Method

Closes an open Connection object and any dependent objects.

ADO Connection Object BeginTrans, CommitTrans, and RollbackTrans Methods

Saves any pending changes and ends the current transaction. It may also start a new transaction.

ADO Connection Object Execute Method

Executes the specified query, SQL statement, stored procedure, or provider-specified text.

ADO Connection Object Open Method

Opens a connection to a data source.

ADO Connection Object OpenSchema Method

Obtains database schema information from the provider. This method is not currently supported on UNIX.

ADO Connection Object BeginTrans, CommitTrans, and RollbackTrans Methods

Cancels any changes made during the current transaction and ends the transaction. It may also start a new transaction.

ADO Connection Object Properties

ADO Connection Object Attributes Property

One or more characteristics of an object.

ADO Connection Object CommandTimeout Property

How long to wait while executing a command before terminating the command and issuing and error.

ADO Connection Object ConnectionString Property

Contains the information used to establish a connection to a data source.

ADO Connection Object ConnectionTimeout Property

How long to wait while establishing a connection before terminating the attempt and issuing and error.

ADO Connection Object CursorLocation Property

The location of the cursor engine in a recordset.

ADO Connection Object DefaultDatabase Property

The default database for the Connection object.

ADO Connection Object IsolationLevel Property

The level of isolation for the Connection object.

ADO Connection Object Mode Property

The available permissions for modifying data in a Connection object.

ADO Connection Object Provider Property

The name of a provider for a Connection object. This property is not available on UNIX.

ADO Connection Object State Property

Describes the current state of the Connection object.

ADO Connection Object Version Property

The ADO version number.

ADO Connection Object Remarks

A Connection object represents a session with a data source. In the case of a client/server database system, it may represent an actual network connection to the server. Depending on the functionality of the provider, some collections, properties, and methods of the Connection object may not be available.

Use the collections, methods, and properties of a Connection object for:

   configuring the connection before opening it with the ConnectionString, CommandTimeout, and ADO Connection Object Mode Property properties.

   setting the CursorLocation property to invoke the Client Cursor Provider, which supports batch updates. Batch updates are not currently supported on UNIX.

   setting the default database for the connection with the DefaultDatabase property.

   setting the level of isolation for the transactions opened on the connection with the IsolationLevel property. Transactions are not currently supported on UNIX.

   specifying an OLE DB provider with the ADO Connection Object Provider Property.

   establishing and breaking the physical connection to the data source with the ADO Connection Object Open Method and ADO Connection Object Close Method methods.

   executing a command on the connection with the ADO Connection Object Execute Method and configuring the execution with the CommandTimeout property.

   managing transactions on the open connection, including nested transactions if the provider supports them, with the BeginTrans, CommitTrans, and RollbackTrans methods and the ADO Connection Object Attributes Property. The transaction methods are not currently supported on UNIX.

   examining errors returned from the data source with the ADO Errors Collection.

   reading the version from the ADO implementation in use with the ADO Connection Object Version Property.

   obtaining schema information about your database with the ADO Connection Object OpenSchema Method.

Note

To execute a query without using a Command object, pass a query string to the Execute method of a Connection object. However, a Command object is required when you want to retain the command text and re-execute it, or use query parameters.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.