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

Home -> Community -> Usenet -> c.d.o.server -> executeUpdate always return 0

executeUpdate always return 0

From: Alon <alonk_at_xor.co.il>
Date: 27 Aug 2002 07:11:25 -0700
Message-ID: <ca2e4373.0208270611.4b3b79cd@posting.google.com>


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

Original text of this message

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