Hi,
I'm using Oracle 10 with Java 1.5. In our stored procedure, we have a
parameter that looks like:
PROCEDURE GET_LOG (p_key_type IN VARCHAR2,
p_key_value IN VARCHAR2,
p_date_from IN VARCHAR2,
p_date_to IN VARCHAR2,
p_dataset_id IN OUT NUMBER,
p_dataset_seq_from IN NUMBER,
p_dataset_seq_to IN NUMBER,
p_rows_per_page IN NUMBER,
p_rows_to_insert IN NUMBER,
p_total_rows OUT NUMBER,
p_rm OUT VARCHAR2,
p_log_ds_csr OUT LOGDS_RC);
Notice parameter 5 is in/out. How do I register an in/out parameter
with JDBC? Thanks, - Dave
John B. Matthews - 06 Oct 2008 20:06 GMT
In article
<37ac7944-3aa7-45b4-8cf6-3711a09fe5e2@v15g2000hsa.googlegroups.com>,
> Hi,
>
[quoted text clipped - 16 lines]
> Notice parameter 5 is in/out. How do I register an in/out parameter
> with JDBC? Thanks, - Dave
It should work as long as you use the same type going in as you do in
registerOutParameter(). An alternative is to write a wrapper procedure
that separates the IN and OUT, as described here:
<http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm
#06_16>

Signature
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews
Arne Vajhøj - 07 Oct 2008 00:00 GMT
> I'm using Oracle 10 with Java 1.5. In our stored procedure, we have a
> parameter that looks like:
[quoted text clipped - 14 lines]
> Notice parameter 5 is in/out. How do I register an in/out parameter
> with JDBC?
Have you tried the obvious:
cstmt.setBigDecimal(5, x);
cstmt.registerOutParameter(5, Types.DECIMAL);
...
cstmt.execute();
...
x = cstmt.getBigDecimal(5);
?
Arne