Inherits From:
EOAdaptorContext : NSObject
Declared in: SybaseEOAdaptor/SybaseContext.h
The features the SybaseContext class adds to EOAdaptorContext are methods for returning Sybase-specific data structures that describe characteristics of the context. The method contextPointer
returns the Sybase global context pointer, so that you can make direct calls to the Sybase client library. The method connection
returns the SybaseContext's CT library connection (CS_CONNECTION *).
contextPointer
Returns the Sybase global context pointer (CS_CONTEXT *). You can use this to make direct calls to the Sybase client library.
loginTimeOutInterval
+ (int)loginTimeOutInterval
Returns the login time out interval used by SybaseContext.
See also: + setLoginTimeOutInterval:
setLoginTimeOutInterval:
+ (void)setLoginTimeOutInterval:
(int)seconds
Sets the login time out interval value SybaseContext uses during the creation of new channels. The default is 0, which means that there is no time out.
See also: + loginTimeOutInterval
setTimeOutInterval:
+ (void)setTimeOutInterval:
(int)seconds
Sets the time out interval valueSybaseContext uses during the creation of new channels. The default is 0, which means that there is no time out.
See also: + timeOutInterval
timeOutInterval
+ (int)timeOutInterval
Returns the time out interval used by SybaseContext.
See also: + setTimeOutInterval:
connect
Opens a connection to the database server. SybaseChannel sends this message to SybaseContext when it (SybaseChannel) is about to open a channel to the server.
See also: - disconnect
connection
- (void *)connection
Returns the CT library connection (CS_CONNECTION *) for the receiver.
disconnect
- (void)disconnect
Closes a connection to the database server. SybaseChannel sends this message to SybaseContext when it (SybaseChannel) has just closed a channel to the server.
See also: - connect
isConnected
- (BOOL)isConnected
Returns YES if the receiver has an open connection to the database, NO otherwise.
See also: - connect , - disconnect
maxTextSizeDefault
- (int)maxTextSizeDefault
Returns the maximum number of bytes to be returned from a Sybase image to text field. The default is set to INT_MAX, as defined for the host machine. This number can be overwritten on a per-channel basis by sending the appropriate SQL to the channel using the evaluateExpression:
method.
See also: - setMaxTextSizeDefault:
raiseCurrentException
- (void)raiseCurrentException
If the receiver has an exception, raises it.
See also: - setCurrentException:
setCurrentException:
- (void)setCurrentException:
(NSException *)exception
Sets to exception the receiver's current exception.
When the SybaseAdaptor encounters an error, it uses the error message to build an NSException and stores the exception in the SybaseContext using this method. The exception can then be reviewed by other components to determine if the error is fatal.
See also: - raiseCurrentException
setMaxTextSizeDefault:
- (void)setMaxTextSizeDefault:
(int)textSize
Sets to textSize the receiver's default textsize. Any channels created after this method has been invoked will use the newly specified textSize.
See also: - maxTextSizeDefault
Methods Implemented By the Delegate
sybaseContext:shouldReportClientMessage:
- (BOOL)sybaseContext:
(SybaseContext *)context shouldReportClientMessage:
(NSDictionary *)clientMessage
Invoked when an exception results from a callback to the CS_CLIENTMSG_CB (Sybase ClientMessage callback). Gives the delegate the opportunity to substitute clientMessage as the userInfo dictionary.
sybaseContext:shouldReportServerMessage:
- (BOOL)sybaseContext:
(SybaseContext *)context shouldReportServerMessage:
(NSDictionary *)serverMessage
Invoked when an exception results from a callback to the CS_SERVERMSG_CB (Sybase ServerMessage callback). Gives the delegate the opportunity to substitute serverMessage as the userInfo dictionary.
Copyright © 1997, Apple Computer, Inc. All rights reserved.