File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Inserting data in database having Table Of Objects using store procedure callablestatement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Inserting data in database having Table Of Objects using store procedure callablestatement" Watch "Inserting data in database having Table Of Objects using store procedure callablestatement" New topic
Author

Inserting data in database having Table Of Objects using store procedure callablestatement

PadamSonu Dhariwal
Greenhorn

Joined: May 25, 2012
Posts: 1
Hi Sir,

I am struck at my project on the below details. I need your help in this if you can provide I will be thankful to you.

Technical Environment : we are using Java & Struts 2, CallableStatement Store Procedure for in order to insert and update. Store Procedure are developed by database team.

I need to insert Table of Objects. Please see the below Store Procedure and my comments in Bold I need to call this GBDF_SAVE_VAR_EQRAGG store procedure in order to insert data using callablestatement In Parameter.

Please give your suggestion how to insert data using Callable Statement which has Table of Objects.

Below Store Procedure.
----------------------------------

create or replace
FUNCTION "GBDF_SAVE_VAR_EQRAGG"
(TipoAzione IN VARCHAR2
,Applicazione IN VARCHAR2
,DataRifChar IN VARCHAR2
,IDSito IN VARCHAR2
,IDAmbito IN VARCHAR2
,IDVar IN VARCHAR2 -- identificativo C_VAR
,DescVar IN VARCHAR2
,SeqVar IN NUMBER
,TabellaVar IN VarCalcTab
,NumeroVar IN NUMBER
,DeltaForz IN NUMBER
,ValoreEqz IN NUMBER
,IDUtente IN VARCHAR2 DEFAULT NULL) RETURN NUMBER



create or replace
TYPE VARCALCTAB AS TABLE OF VarCalcRec ;

create or replace
TYPE VARCALCREC AS OBJECT
( VarSign CHAR(1)
, VarName VARCHAR2(20)) ;
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inserting data in database having Table Of Objects using store procedure callablestatement