Hello,
When I create db procedure without OUT parameter and I try to update/insert some records within this dbprocedure, this one don't return number of updated/inserted records.
For example:


CREATE TABLE test_table (
test_value VARCHAR(50)
)


     CREATE DBPROCEDURE update_test_value (
        IN in_old_test_value VARCHAR(50),
        IN in_new_test_value VARCHAR(50)
     )
     AS
     TRY
        UPDATE test_table SET
               test_value = :in_new_test_value
        WHERE test_value = :in_old_test_value;
     CATCH
        IF $RC <> 0 THEN STOP ($RC, $ERRMSG);


This is the java code that call db procedure. There is expected number of updated records in the variable iUpdateCount but allways 0 is returned.



CallableStatement updateStatement = null; int iUpdateCount = 0;

updateStatement = dbConnection.prepareCall(strUpdateCall);
updateStatement.setString(1, strOldValue);
updateStatement.setString(2, strNewValue);
// here is the bug in SAP DB, if there is called stored procedure without
// output parameters, there is not returned number of updated records iUpdateCount = updateStatement.executeUpdate();


  Db procedure returns correct number of updated records when I add
an OUT paramete into the db procedure.

Is this feature of the SAP DB procedures or bug?

 Thanks for answer,
 Julian
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to