Please help.... I am getting java.lang.ClassCastException: sun.jdbc.odbc.JdbcOdbcCallableStatement [message #138624] |
Thu, 22 September 2005 14:11 |
hphanjra
Messages: 1 Registered: September 2005 Location: US
|
Junior Member |
|
|
I am getting JDBCODBCCallabaleStatement Exception
Promptly help is need:
My code is as follows:
dbURL = "jdbc:odbc:orcl";
try {
// Load the jdbc-odbc bridge driver
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String sql = " call user_to_notyfy(?,?,?,?)";
System.out.println("Getting Connection");
conn = DriverManager.getConnection(dbURL, "test", "test"); // user, passwd
System.out.println("Connected..");
OracleCallableStatement myStatement = ( OracleCallableStatement)conn.prepareCall( sql );
myStatement.registerOutParameter(4,OracleTypes.ARRAY,"SIMPLEARRAY");
myStatement.setString(1,"usr1");
myStatement.setInt(2, 20);
myStatement.setInt(3, 20);
myStatement.execute();
conn.close();
} catch (Exception e){System.out.println(e);}
}
Any help is greatly appreciated ...
|
|
|
|