Please enable JavaScript to view this site.

ESL Documentation

Level 2 subroutine

Return procedure names stored in a specific data source.

call EDSProcedures(HSTMT_IV, PROCTABLE_STRUCT , MAXROWS_IV, NUMROWS_IV, ARRAY_STRUCT) 

HSTMT_IV An input integer value that indicates the statement handle.

PROCTABLE_STRUCT An input EDSTABLE_STRUCT structure that contains the procedure table QUALIFIER, OWNER, and NAME.

MAXROWS_IV An input integer value indicating the maximum number of rows in the result array.

NUMROWS_IV An output integer value indicating the actual number of rows in the result array.

ARRAY_STRUCT An output array of EDSPROC_STRUCT structures that contain the procedure names stored in a specific data source.

Description

EDSProcedures lists all procedures, or executable objects, in the requested range. A user may or may not have permission to execute any of these procedures. To check accessibility, the ESL application can call EDSGetInfo and check the EDS_ACCESSIBLE_PROCEDURES information value. Otherwise, your application must be able to handle a situation in which the user selects a procedure that it cannot execute. EDSProcedures returns results as an array of structures.

The PROCTABLE.OWNER and PROCTABLE.NAME arguments accept search patterns. For more information about valid search patterns, see Catalog Commands.

EDSProcedures returns the results as a standard result set, ordered by PROCEDURE_QUALIFIER, PROCEDURE_OWNER, and PROCEDURE_NAME. The following table lists the columns in the result set.

Column Name

Data Type

Comments

PROCEDURE_QUALIFIER

string

Procedure qualifier identifier; NULL if not applicable to the data source.

PROCEDURE_OWNER

string

Procedure owner identifier; NULL if not applicable to the data source.

PROCEDURE_NAME

string not NULL

Procedure identifier.

NUM_INPUT_PARAMS

integer not NULL

Number of input parameters; –1 if the number of parameters is unknown; 0 or greater indicates the actual number of parameters.

NUM_OUTPUT_PARAMS

integer not NULL

Number of output parameters; –1 if the number of parameters is unknown; 0 or greater indicates the actual number of parameters.

NUM_RESULT_SETS

integer not NULL

Number of result sets returned by the procedure; –1 if the number of result sets is unknown; 0 or greater indicates the actual number of result sets returned.

REMARKS

string

A description of the procedure.

Return Value

EDSProcedures returns EDS_SUCCESS, EDS_ERROR, or EDS_INVALID_HANDLE.

When EDSGetProcedures returns EDS_ERROR, you can obtain an associated SQLSTATE value with more specific information by calling EDSError. The following table lists each typical SQLSTATE value and explains each one in the context of the command EDSProcedures.

The following table lists possible SQLSTATE values:

SQL

STATE

Error

Description

08S01

Communication link failure

The communication link between the driver and the data source to which the driver was connected failed before the function completed processing.

24000

Invalid cursor state

Results were pending on the statement handle from a previous SELECT statement or a cursor associated with the statement handle had not been closed.

IM001

Driver does not support this function

The driver associated with the statement handle does not support this function.

S1000

General error

An error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by EDSError in the argument ERRORTEXT describes the error and its cause.

S1001

Memory allocation failure

The driver was unable to allocate the memory required to support execution or completion of the function.

S1008

Operation cancelled

Asynchronous processing was enabled for the statement handle. The function was called and before it completed execution, EDSCancel was called on the statement handle. Then the function was called again on the statement handle.

S1010

Function sequence error

An asynchronously executing function (not this one) was called for the statement handle and was still executing when this function was called.

S1C00

Driver not capable

A procedure qualifier or a procedure owner was specified, and the driver or data source does not support one or both of the qualifiers. A string search pattern was specified for the procedure owner or procedure name, and the driver or data source does not support search patterns for one or more of those arguments.

S1T00

Timeout expired

The timeout period expired before the data source returned the requested result set. The timeout period is set through EDSSetStmtOption, EDS_QUERY_TIMEOUT.

See Also

EDSForeignKeys returns columns in a foreign key.