wood burning stoves 2.0*
The moose likes JDBC and the fly likes JDBC program to invoke stored procedure with complex input types Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC program to invoke stored procedure with complex input types" Watch "JDBC program to invoke stored procedure with complex input types" New topic
Author

JDBC program to invoke stored procedure with complex input types

Shriyans Reddy
Greenhorn

Joined: Dec 21, 2011
Posts: 5
Can you please help me writing the JDBC program to call the below stored procedure which is having the complex input type.

Below is my stored procedure definition


CREATE OR REPLACE TYPE inputObjects_t AS OBJECT (
serviceID VARCHAR2(7),
offerID VARCHAR2(7),
transactionID NUMBER
)

CREATE OR REPLACE TYPE inputArray_t IS VARRAY(100) OF inputObjects_t

PROCEDURE CheckObjectInput( pCustomerRef IN VARCHAR2,
pSubscriptionPS IN NUMBER,
pExpiryObjects IN inputArray_t,
pTransactionDtm IN DATE,
pTransactionID IN NUMBER);

PROCEDURE CheckObjectOutput( pCustomerRef IN VARCHAR2,
pSubscriptionPS IN NUMBER,
pExpiryObjects OUT inputArray_t,
pTransactionDtm IN DATE,
pTransactionID IN NUMBER);
Ireneusz Kordal
Ranch Hand

Joined: Jun 21, 2008
Posts: 423
Read this: webpage
and this: webpage
from oracle docs.
These links are for oracle 11.2, for other versions look for "JDBC developer guide" in documentation of the proper version.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JDBC program to invoke stored procedure with complex input types
 
Similar Threads
How to read object collection as an out parameter of stored procedure(Oracle)?
invalid name pattern
Oracle Stored Procedure Problem
Varchar & Varchar2 in Stored procedure
Error calling stored procedure !!