Product Home Page | Developer Site | Version | |
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 © 2003 Sun Microsystems, Inc. All rights reserved.