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
odbcConnect
- (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.
odbcDatabaseConnection
- (void *)odbcDatabaseConnection
Returns the ODBC Database Connection Handle (HDBC) as a void*
; you must cast it to HDBC to work with it.
See also:
- setOdbcDatabaseConnection:
odbcDisconnect
- (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.
setOdbcDatabaseConnection:
- (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).
See also:
- odbcDatabaseConnection