[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: org.jboss.resource.adapter.jdbc.WrappedCallableStatement

jaikiran do-not-reply at jboss.com
Fri Dec 14 02:31:25 EST 2007


Try this

  | import org.jboss.resource.adapter.jdbc.WrappedCallableStatement;
  | import oracle.jdbc.OracleCallableStatement;
  | import oracle.jdbc.OracleTypes;
  | import oracle.jdbc.pool.OracleDataSource;
  | import java.lang.*;
  | import java.util.*;
  | import java.io.*;
  | import java.sql.*;
  | ............
  | ........
  | .....
  | 
  | OracleCallableStatement cstmt = null;
  | WrappedCallableStatement wcs = null;
  | String[] orgNames = null;
  | int maxTablLen = 250;
  | int eleMaxLen = 100;
  | 
  | try{
  |       ConnPool conObj = new ConnPool();
  |       con = conObj.getConnection();
  | 				
  |      
  |     wcs = (WrappedCallableStatement)  con.prepareCall(" begin"+
  | "GETS_LMS_RECAP_DEFECTS_PKG.GETS_PL_SQL_TEST(?);"+ 
  | " end;");
  |    cstmt = (OracleCallableStatement) wcs.getUnderlyingStatement();
  | cstmt.registerIndexTableOutParameter(1,maxTablLen,OracleTypes.VARCHAR,eleMaxLen);
  | 
  | cstmt.execute();
  | 					
  | orgNames = (String [])cstmt.getObject(1); 
  | 						
  | System.out.println("Number of rows= "+orgNames.length);
  | for (int i=0; i<orgNames.length; i++){
  |  System.out.print(orgNames);
  |  System.out.println();
  | } 
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112817#4112817

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112817



More information about the jboss-user mailing list