Microsoft SDK for Java

Connection Class Methods

The Connection class has the following methods:

addOnBeginTransComplete is called after the beginTrans operation.
addOnCommitTransComplete is called after the commitTrans operation.
addOnConnectComplete is called after a connection starts.
addOnDisconnect is called after a connection ends.
addOnExecuteComplete is called after a command has finished executing.
addOnInfoMessage is called whenever a warning occurs during a ConnectionEvent operation.
addOnRollbackTransComplete is called after the rollbackTrans operation.
addOnWillConnect is called before a connection starts.
addOnWillExecute is called just before a pending command executes on this connection.
beginTrans begins a new transaction.
cancel cancels execution of a pending, asynchronous execute or open method call.
close closes an open object and any dependent objects.
commitTrans saves any changes and ends the current transaction. It may also start a new transaction.
execute executes the specified query, SQL statement, stored procedure, or provider-specific text.
executeUpdate calls the underlying ADO execute method with certain parameters.
getAttributes retrieves a read/write value that can be the sum of one or more XactAttribute values.
getCommandTimeout indicates, in seconds, how long to wait for a command to execute.
getConnectionString retrieves a connection to a data source.
getConnectionTimeout indicates how long to wait while establishing a connection before terminating the attempt and generating an error.
getCursorLocation returns the location of the cursor service.
getDefaultDatabase retrieves the name of the default database for a Connection object.
getErrors retrieves all the error objects created in response to a single failure involving the provider.
getIsolationLevel retrieves the level of isolation for the transactions opened on the connection.
getMode retrieves the available permissions for modifying data in a Connection.
getProperties retrieves the Property objects for a specific instance of an object.
getProvider retrieves the name of the provider for a Connection object.
getState indicates whether the state of the object is open, closed, connecting, executing, or fetching.
getVersion retrieves the ADO version number.
open opens a connection to a data source.
openSchema obtains database schema information from the provider.
rollbackTrans cancels any changes made during the current transaction and ends the transaction. It may also start a new transaction.
setAttributes assigns a read/write value that can be the sum of one or more XactAttribute values.
setCommandTimeout assigns how long to wait for a command to execute.
setConnectionString establishes a connection to a data source.
setConnectionTimeout defines how long to wait while establishing a connection before terminating the attempt and generating an error.
setCursorLocation assigns the location of the cursor service.
setDefaultDatabase assigns the name of the default database for a Connection object.
setIsolationLevel assigns the level of isolation for the transactions opened on the connection.
setMode assigns the available permissions for modifying data in a Connection.
setProvider assigns the name of the provider for a Connection object.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.