The ITRoutineManager class

Base class: ITErrorManager

This functionality provided by this class is only supported with HCL Informix® databases.

The ITRoutineManager class provides an alternative way to execute server routines. When using ITRoutineManager, a connection does not have to be checked out to get or execute a routine (and a value object, therefore, can use it), and the execution of the routine commences faster (since there is no SQL to parse). See The ITConnection class for information about connection checkout.

This class provides the following methods.
Method Description
ITRoutineManager(ITConnection &) Creates a Routine Manager for the specified connection.
ITBool GetRoutine(const ITString & signature) Gets the descriptor for the registered routine from the server so the routine can be executed later by ExecForValue(). Returns TRUE if it gets the routine descriptor, FALSE otherwise.
const ITTypeInfo *ResultType() const Returns a pointer to an ITTypeInfo instance that encapsulates the type of the return value of the routine. It returns NULL if did not get the routine.
int NumParams() const Returns the number of parameters the routine accepts, -1 if did not get the routine.
const ITTypeInfo *ParamType(int paramno) const Returns a pointer to an ITTypeInfo instance that encapsulates the type of the specified parameter. It returns NULL if did not get the routine or if the argument is out of bounds.
ITValue *Param(int paramno) const Returns a pointer to the parameter value object, NULL if did not get the routine or if the argument is out of bounds.
ITBool SetParam(int paramno, ITDatum *pdatum) Sets the parameter value object for a specified parameter index to the pdatum. Returns TRUE on success, FALSE if did not get the routine or if the parameter is out of bounds, or the ITDatum is not of the same type as the corresponding routine parameter type.
ITValue *ExecForValue(ITEssential **outerunkn = NULL) Executes the routine with the set parameters. Returns a pointer to the ITValue interface of the value object, instantiated for the return value. Returns NULL if did not get the routine or if execution failed.