Documentation Archive Developer
Search
[an error occurred while processing this directive] PATH  Documentation > WebObjects 4.5 > ODBCEOAdaptor Reference

Table of Contents

ODBCContext


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.

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.

odbcDriverInfo

- (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.

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).


Table of Contents