Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in regestering OUT param of type OBJECT for ORACLE using JDBC  RSS feed

 
java freak
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i have a SP like this


DCE_REPORT_PKG.estimator_stat_sp

(i_str_userid IN estimate.created_by%TYPE,

o_cur_report OUT DCE_COMMON_CONSTANT_PKG.g_con_ref_cursor,

o_obj_error OUT dce_ob_error, //which is of object type

o_num_status OUT NUMBER);


The resultset contains the following columns



ESTIMATOR VARCHAR2(8)

ESTIMATE_CNT NUMBER(7)

ESTIMATE_LEVEL NUMBER(2)

ESTIMATE_TYPE NUMBER(2)

COMPLETE_CNT NUMBER(3)

AVG_TIME_TAKEN NUMBER(5,2)


and now i am trying to call this SP using my java program
i am able to register the out param for OBJECT TYPE i.e third param

my doubt is how i can register the output param for 3rd (dce_ob_error) which is of OBJECT type

and how i can get result from this ???

my java program is like this
CallableStatement cs=connection.prepareCall("{call DCE_REPORT_PKG.estimator_stat_sp(?,?,?,?)}");
cs.setString(1,"jn26557");
cs.registerOutParameter(2, oracle.jdbc.driver.OracleTypes.CURSOR );
cs.registerOutParameter(3, ???);//What should i use here
cs.registerOutParameter(4, oracle.jdbc.driver.OracleTypes.INTEGER);
cs.execute();

plz help me in this
i have no idea how to do it

any help would be appreciated


Thanks in advance
Jaya Prakash Nalajala
 
Shailesh Chandra
Ranch Hand
Posts: 1084
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JayaPrakash,

try with java.sql.Types.OTHER , but I dont know it will work or not.
[ March 31, 2005: Message edited by: Shailesh Chandra ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!