Results 1 to 5 of 5
- 01-12-2012, 04:13 PM #1
Member
- Join Date
- Jan 2012
- Posts
- 3
- Rep Power
- 0
JDBC program to invoke stored procedure with complex inputs and output
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);
- 01-12-2012, 05:43 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
Re: JDBC program to invoke stored procedure with complex inputs and output
This is the relevant bit of documentation from Oracle.
Actually, the whole page is probably quite handy.
Essentially you want a STRUCT to pass in.
You get a descriptor from the database, using the name of your TYPE, and then build the STRUCT from that and the array of attributes.
Then you'll want to read about arrays.
- 01-12-2012, 06:50 PM #3
Member
- Join Date
- Jan 2012
- Posts
- 3
- Rep Power
- 0
Re: JDBC program to invoke stored procedure with complex inputs and output
ThanQ for the reply I will try with the documentation provided.
- 01-12-2012, 06:51 PM #4
Member
- Join Date
- Jan 2012
- Posts
- 3
- Rep Power
- 0
Re: JDBC program to invoke stored procedure with complex inputs and output
if you have a sample code that would be really helpful for me thanQ in advance.
- 01-13-2012, 09:30 AM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
Similar Threads
-
getting gateway timeout while executing a stored procedure via jdbc
By progyan das in forum Java ServletReplies: 1Last Post: 05-01-2011, 03:53 PM -
Debug mySql stored procedure
By ulix83 in forum NetBeansReplies: 0Last Post: 10-29-2009, 11:48 AM -
calling stored procedure through java
By KTR in forum JDBCReplies: 2Last Post: 01-30-2009, 12:53 PM -
stored procedure
By sankarigopi in forum JDBCReplies: 1Last Post: 11-13-2008, 04:53 PM -
How to get multiple rows from Stored Procedure
By SRJ1957 in forum Advanced JavaReplies: 0Last Post: 08-11-2008, 08:26 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks