Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.databases > #286

Re: jdbc in/out parameter

From "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this>
Subject Re: jdbc in/out parameter
Message-ID <nospam-EB319C.15055106102008@news.motzarella.org> (permalink)
Newsgroups comp.lang.java.databases
References <37ac7944-3aa7-45b4-8cf6-3711a09fe5e2@v15g2000hsa.googlegroup
Date 2011-04-27 15:22 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.databases
In article 
<37ac7944-3aa7-45b4-8cf6-3711a09fe5e2@v15g2000hsa.googlegroups.com>,
 laredotornado <laredotornado@zipmail.com> wrote:

> 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

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>

-- 
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.databases | Previous | Next | Find similar


Thread

Re: jdbc in/out parameter "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000

csiph-web