BackGroud Story:
I have observed that Sybase JDBC driver (jconn3) is eating exceptions on Statement.ExecuteUpdate(sql).
The SQL statement was an Insert statement which inserts a row into a table (This is not a temp table) but still Statement.ExecuteUpdate(sql)
returns 0 dues to unknown reasons.
This issue is random and do no appear to happen everytime.
My understanding is Statement.ExecuteUpdate(sql)
returns 0 if no rows have been updated. But as the case is of Insert statement I am not sure why exception was not thrown if nothing was inserted.
As the code is legacy (JDK 1.4 is being used) and due to some limitation I am not able to change or update JDBC Driver.
Possiblilties :
I was thinking with an angle if Driver has different internal implementation of ExecuteUpdate with respect to Statement,PreparedStatement and CallableStatement then I can suggest to change Statement to CallableStatement to call ExecuteUpdate.
I am curious to know if the implementation of ExecuteUpdate is possibly different for Statement,PreparedStatement and CallableStatement in Sybase JDBC Driver.