skip to main content
Interface Provider class : ipSchemaEx
 

ipSchemaEx

You must implement this optional method in your IP to support stored procedures with one or more runtime defined results. The OpenAccess SDK SQL engine calls this method to get a list of procedure result columns. The GETSUPPORT method should return true for IP_SUPPORT_SCHEMA.
Note: This method is not required if the output result set of the stored procedure is fixed in terms of what columns are returned and you are only returning one result set.
int ipSchemaEx(
    long   hstmt,
    long   pMemTree,
    int    iType,
    long   pList,
    Object pSearchObj)
Table 28. Parameters for ipSchemaEx
Parameter
Type
Description
INPUT
hstmt
long
The OpenAccess SDK SQL engine statement handle.
pMemTree
long
The memory tree to be used for all memory allocation.
iType
int
Type of schema information requested:
DAMOBJ_TYPE_PROC_COLUMN - procedure columns information as defined by OA_PROCCOLUMNS.
pList
long
Requested object(s) are returned by placing them in this list using the dam_add_schemaobj calls. The IP can pass the pSearchObj filter to the dam_add_schemaobj methods to have the OpenAccess SDK SQL engine filter the objects before adding to the list.
pSearchObj
Object
Contains the information about search conditions for the requested object type. This information is used by the IP and by the OpenAccess SDK SQL engine to filter out information returned by the IP. For example, if the OpenAccess SDK SQL engine only needs columns for a specific table, it sets table_name in the pSearchObj. The IP uses this information or passes the pSearchObj to the OpenAccess SDK SQL engine when calling the dam_add_schemaobj method. It is NULL if no search criteria is specified. For example, if the user issues SELECT * FROM oa_tables, pSearchObj is NULL and the IP returns all table objects. Access this data by typecasting this object based on the requested object type (iType) and then accessing the members methods to retrieve the required information:
DAMOBJ_TYPE_PROC_COLUMN
RETURN
int
DAM_SUCCESS - on success
DAM_FAILURE - on failure

See also

*dam_add_schemaobj