In most cases, the implementation of C component methods require no special coding. Simply add code to the method body that contains the application logic to respond to the input parameter values and assign the correct return values to inout, output, and return parameters.
The exceptions to this rule are:
Components that require instance specific data
C component instances do not have private data. If your design requires the allocation of separate data for instances of the same component, see “Components that require instance specific data”.
C components that are wrappers for C++ classes
Since C component methods must be C functions, you must code a set of C wrapper functions that instantiate and interact with an instance of the C++ class. See “C components that are wrappers for C++ classes” for more information.
Methods that interact with remote database servers
You can use a connection cache to improve performance when connecting to database servers. See “Methods that interact with remote database servers” for more information.
Methods that return row results
an EAServer method can return row results to the client. Doing so requires the use of Server-Library calls. See “Methods that return row results” for more information.
Share data between C or C++ components
Components within the same package can share the same data. See “Share data between C or C++ components” for more information.
Methods that set transactional state
Methods in a transactional component should call one of the transaction primitive routines to set the transaction state before returning. See “Methods that set transactional state” for more information.
Copyright © 2005. Sybase Inc. All rights reserved. |