Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> JDBC types for getting a ResultSet from a CallableStatement

JDBC types for getting a ResultSet from a CallableStatement

From: Loren Cahlander <loren_at_ensodex.com>
Date: Mon, 07 Jan 2002 11:30:43 -0600
Message-ID: <3C39DB43.5030200@ensodex.com>

Hello,

The following is a very stripped down block of code, but it gets at the heart of my question. The type used in this block of code is specific to the Oracle database driver. What types do I need for the other database drivers. I remember that there was a java.sql.Types entry to use as a general case, but it has been a while since I started using this code and I forgot the general case. I would appreciate any help.



CallableStatement stmt= null;
ResultSet resultSet = null;

stmt = conn.prepareCall("{call GetEmployees(?)}");

stmt.registerOutParameter(1,

                           oracle.jdbc.driver.OracleTypes.CURSOR);
stmt.execute();
resultSet = (ResultSet)stmt.getObject(1);

Thanks,
Loren Received on Mon Jan 07 2002 - 11:30:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US