home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep (Enterprise)
/
OpenStepENTCD.toast
/
OEMINSYS
/
ODBCAD.Z
/
ODBCContext.h
< prev
next >
Wrap
Text File
|
1996-09-09
|
3KB
|
81 lines
/*
ODBCContext.h
Copyright (c) 1996, NeXT Software, Inc.
All rights reserved.
*/
#import <EOAccess/EOAccess.h>
@interface ODBCContext:EOAdaptorContext
{
void * _odbcDatabaseConnection; // HDBC
unsigned int _openChannelCount;
unsigned int _fetchesInProgress;
BOOL _isConnected;
}
// Superclass overrides
- initWithAdaptor:(EOAdaptor *)anAdaptor;
// designated initializer. The context expects an ODBCAdaptor here.
- (void)beginTransaction;
// Attempts to begin a new transaction. Raises an exception if an error is
// encountered.
- (void)commitTransaction;
// Attempts to commit the last transaction begun. Raises an exception
// if an error is encountered. This method will raise an exception if
// any of the context's channels have a fetch in progress.
- (void)rollbackTransaction;
// Attempts to roll back the last transaction begun. Raises an exception
// if an error is encountered. This method will raise an exception if any
// of the context's channels have a fetch in progress.
- (BOOL)canNestTransactions;
// Returns NO.
- (unsigned)transactionNestingLevel;
// Returns the number of transactions in progress. Since transactions
// are not nested, this number is either 0 or 1.
- (EOAdaptorChannel *)createAdaptorChannel;
// Returns a new ODBCChannel. Returns nil if a new channel cannot
// be created. EOAdaptorContexts by default have no channels at all.
// The newly created channel retains its context.
// ODBC Specific
- (void)odbcConnect;
- (void)odbcDisconnect;
// Do not call these method directly,
// it's done automaticaly for you.
- (void)channelWillOpen;
- (void)channelDidClose;
// The context keep a count of opened channels.
// The first WillOpen will generate an odbcConnect and
// the last DidClose a odbcDisconnect.
- (void)channelWillBeginFetching;
- (void)channelDidEndFetching;
// The context keep a count of fetching channels in
// order to avoid commiting a transaction in a middle
// of a fetch.
- (void *)odbcDatabaseConnection;
// Returns the ODBC Database Connection Handle (HDBC)
- (void)setOdbcDatabaseConnection:(void *)odbcDatabaseConnection;
// Could be called from the adaptorContextShouldConnect: delegate method
// to setup a connection in an alternate way (By using SQLBrowseConnect()
// for example).
- (NSDictionary *)odbcDriverInfo;
// Returns a dictionnary summarizing some important information about the
// driver (driver name, version, support NOT NULL, and other stuff). This
// method will connect to the database if the context is not yet connected.
@end