DatabaseMetaData and Oracle REF CURSOR types

From: Andy Grove <nospam_at_codefutures.com>
Date: 13 Jul 2003 07:43:05 -0700
Message-ID: <4a4839e0.0307130020.a379ac7_at_posting.google.com>


Hi,

I am trying to reverse engineer information about stored procedures using the JDBC DatabaseMetaData.getProcedureColumns() method.

When the procedure has REF CURSOR parameters I get information about the REF CURSOR itself as well as the columns within the REF CURSOR but I cannot see a way of determining whether each column is a normal parameter or part of a REF CURSOR parameter.

For example, if I have this procedure:

PROCEDURE GET_CUSTOMER_DETAIL
(

p_email in varchar,
p_customer in out customerRef,
p_test in varchar,
p_download in out downloadRef

)

I get the following information from getProcedureColumns() and I cannot tell if the parameter 'p_test' is part of the p_customer ref cursor or a normal parameter. Does anyone know how to get this information?

[0] P_EMAIL (VARCHAR2 ) IN
[1] P_CUSTOMER (REF CURSOR ) IN/OUT
[2] null (PL/SQL RECORD ) IN/OUT
[3] EMAIL (VARCHAR2 ) IN/OUT
[4] FIRST_NAME (VARCHAR2 ) IN/OUT
[5] LAST_NAME (VARCHAR2 ) IN/OUT
[6] TITLE (VARCHAR2 ) IN/OUT
[7] JOB (VARCHAR2 ) IN/OUT
[8] COMPANY (VARCHAR2 ) IN/OUT
[9] PHONE (VARCHAR2 ) IN/OUT
[10] FAX (VARCHAR2 ) IN/OUT
[11] REGION (CHAR ) IN/OUT
[12] PROSPECT (NUMBER ) IN/OUT
[13] OPTIN (NUMBER ) IN/OUT
[14] P_TEST (VARCHAR2 ) IN
[15] P_DOWNLOAD (REF CURSOR ) IN/OUT
[16] null (PL/SQL RECORD ) IN/OUT
[17] PRODUCT (VARCHAR2 ) IN/OUT
[18] EMAIL (VARCHAR2 ) IN/OUT
[19] DOWNLOAD_DATE (DATE ) IN/OUT
Thanks,

Andy. Received on Sun Jul 13 2003 - 16:43:05 CEST

Original text of this message