jdbc oracle function connectivity [message #619] |
Mon, 25 February 2002 01:35  |
Lalit
Messages: 7 Registered: February 2002
|
Junior Member |
|
|
Can any body help me debugging this code where i want to get a parameter out of the function PUT_USERS
in case of procedure it is working perfectly but there are problems for function.
Thanks in Advance.
Lalit
Hyd.
India.
dbConn.setAutoCommit(true);
CallableStatement cs = dbConn.prepareCall("{call ? := PUT_USERS(?,?,?,?) }");
cs.registerOutParameter(1,Types.VARCHAR);
cs.setString(1,mailId);
cs.registerOutParameter(2,Types.VARCHAR);
cs.setString(2,siteName);
cs.registerOutParameter(3,Types.INTEGER);
cs.setInt(3,frequency);
cs.registerOutParameter(4,Types.FLOAT);
cs.setFloat(4,offset);
//cs.getInt(1);
cs.executeUpdate();
//int result =((OracleCallableStatement)cs).getInt(1);
int result = cs.getInt(1);
System.out.println("result is: " + result + "n");
//int reply = cs.getInt(1);
//out.println("this is the reply " + reply);
cs.close();
|
|
|
|
|