JDBC Thin Driver and Stored Procedures - Any Hope?
Date: 1997/09/22
Message-ID: <606o6c$fj7$1_at_news-srv1.fmr.com>#1/1
Using the current thin version of the JDBC Driver and Oracle 7.3.2 from the MS JVM 2.0 environment I'm attempting to call a stored procedure that returns a results set. The database connection works, however, the stored procedure call fails with:
java.sql.SQLException: Bigger type length than Maximum
Anyone know what's going on or have similar problems? The same code works with the oracle OCI7 driver on a unix platform.
Thanks,
Ralph
try
{
// Load the driver
Class.forName ("oracle.jdbc.driver.OracleDriver");
// Connect to the database
Connection conn =
DriverManager.getConnection
("jdbc:oracle:thin:_at_bicycle:1521:tom1","name", "password");
// Prepare a PL/SQL call
CallableStatement call =
conn.prepareCall ("{? = call sai.get_code_type }");
call.registerOutParameter (1, OracleTypes.CURSOR);
call.execute (); //<<<<<<<<<<<<<<<<<<<<<<Throwsexception
ResultSet rset = (ResultSet)call.getObject (1);
// Dump the cursor
while (rset.next ())
System.out.println (rset.getString ("CODE_TYP_CD") + ' ' +
rset.getString ("CODE_TYP_DESC"));
}
catch (Exception e)
{
System.out.println(e.toString());
}
Received on Mon Sep 22 1997 - 00:00:00 CEST