• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

calling procedure with user defined IN & OUT parameters

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have procedure in a package which I need to call from the JDBC. My problem is, that procedure take user-defined data types as IN parameters & gives user-defined OUT paramters. How do I call a procedure like this. Do I need to write the wrapper class. If so from where do I start, I mean I don't have any idea about writing wrapper classes. Its an urgent requirement. Help me please.

The procedure is like this..........

PROCEDURE AR_SUMMARY(p_cust_name IN hz_parties.party_name%TYPE,
p_chr_id IN okc_k_headers_b.ID%TYPE,
x_ar_summ_tbl OUT NOCOPY ar_summ_tbl_type,
x_excp_messageOUT VARCHAR2);
 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This can all be handled with the JDBC CallableStatement...

See the tutorial:
http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/callablestatement.html
[ April 04, 2006: Message edited by: stu derby ]
 
Lalitha Vydyula
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks stu derby. But what I was asking was, how do I call procedure with user-defined IN & OUT parameters. Below is the package spec which might help you uderstand my question more clearly.
----------------------
CREATE OR REPLACE PACKAGE FAM_AR_SUMMARY_PKG IS

TYPE ar_summ_rec_type IS RECORD (
CUST_NAMEhz_parties.party_name%TYPE,
CUST_ACCT_NOhz_cust_accounts_all.ACCOUNT_NUMBER%TYPE,
CUST_ACCT_BALNUMBER,
CUST_PAST_DUE_BALNUMBER,
CUST_UNAPP_REC_BALNUMBER,
CONTRACT_NOokc_k_headers_b.CONTRACT_NUMBER%TYPE,
ANN_DATEokc_k_headers_b.END_DATE%TYPE,
TOT_CONTRACT_VALUEokc_k_headers_b.ESTIMATED_AMOUNT%TYPE,
PAST_DUE_AMTNUMBER,
DAYS_PAST_DUENUMBER,
INV_PAST_DUENUMBER,
DEP_INV_BALNUMBER,
AMT_CREDITEDNUMBER);

TYPE ar_summ_tbl_type IS TABLE OF ar_summ_rec_type
INDEX BY BINARY_INTEGER;


PROCEDURE FAM_GET_AR_SUMMARY(p_cust_name IN hz_parties.party_name%TYPE,
p_chr_id IN okc_k_headers_b.ID%TYPE,
x_ar_summ_tbl OUT NOCOPY ar_summ_tbl_type,
x_excp_messageOUT VARCHAR2);

END FAM_AR_SUMMARY_PKG;

Please help me. Its an urgent requirement.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic