PATH
Documentation > WebObjects 4.5 >
ODBCEOAdaptor Reference
Inherits
from: EOAdaptorContext : NSObject
Declared in: ODBCEOAdaptor/ODBCContext.h
Class Description
An ODBCContext represents a single transaction scope on the
database server to which its adaptor object is connected. If the
server supports multiple concurrent transaction sessions, the adaptor
may have several adaptor contexts. An ODBCContext may in turn have
several ODBCChannels, which handle actual access to the data on
the server.
The features the ODBCContext class adds to EOAdaptorContext
are methods for managing ODBC connections and for getting information
about the driver.
Instance Methods
- (void)odbcConnect
Opens a connection to the database server. ODBCChannel
sends this message to ODBCContext when it (ODBCChannel) is about
to open a channel to the server. This method is called automatically
by the framework.
- (void *)odbcDatabaseConnection
Returns the ODBC Database Connection Handle
(HDBC) as a void*; you must cast it to
HDBC to work with it.
- (void)odbcDisconnect
Closes the connection to the database server.
ODBCChannel sends this message to ODBCContext when it (ODBCChannel)
has just closed a channel to the server.
- (NSDictionary *)odbcDriverInfo
Returns a dictionary summarizing some important
information about the driver (driver name, version, support of NOT
NULL, and so on). Connects to the database if a connection isn't
already in place.
- (void)setOdbcDatabaseConnection:(void
*)odbcDatabaseConnection
Sets to odbcDatabaseConnection the
ODBC Database Connection Handle (HDBC). You can invoke this method
from the delegate method adaptorContextShouldConnect: to
set up a connection in an alternative way (by using SQLBrowseConnect()
,
for example).