Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> executeUpdate always return 0
hi ,
i am running a simple stored procedure on oracle 8.1.7 from a java
application,
the update of the db works fine but the executeQuery() always return 0
even if it updated a column.
My java code is :
String stmt = ( "{call STP_UPDATE_MERCHANT_TERMINAL(?,?,?,?,?,?,?,?,?,?,?,?,?)}" );
CallableStatement cs = this.m_oConn.prepareCall(stmt);
cs.setString(1, xmlFormObj.getValueByName("xxxx")); cs.setString(2, xmlFormObj.getValueByName("yyyy")); cs.setInt (3, xmlFormObj.getIntValue("xxxx")); cs.setString(4, xmlFormObj.getValueByName("yyyy")); cs.setInt (5, xmlFormObj.getIntValue("ttttt")); cs.setString(6, xmlFormObj.getValueByName("uuuuu")); cs.setString(7, xmlFormObj.getValueByName("jjjjjj")); cs.setString(8, xmlFormObj.getValueByName("fffff")); cs.setString(9, xmlFormObj.getValueByName("sssss")); cs.setString(10,xmlFormObj.getValueByName("vvvvv")); cs.setString(11,xmlFormObj.getValueByName("mmmmm")); cs.setString(12,xmlFormObj.getValueByName("kkkkk")); cs.setString(13,xmlFormObj.getValueByName("bbbbb"));
int nResult = cs.executeUpdate();
System.out.println("Result : " + nResult );
cs.close();
does any one have any ideas ,
Thanks in advanced
Alon
Received on Tue Aug 27 2002 - 09:11:25 CDT