We are experiencing a strange issue with DB2 on AIX. Our JAVA application which is running in WebSphere Application Server, is trying to delete a couple of records from a table and then insert new rows into the same table. Our application is using the VisualAge Persistence Builder to manage all database connectivity and transactions.
For some reason, the delete SQL statements is not even sent to the database server. The insert statements are being sent and executed.
Now, to add some more to the confusion, this only happens in one environment. We have the same application, running on another WAS and DB2 (same versions) and perform both the delete and insert successfuly.
I wonder if anyone has run into something like this and could shed some light on this enigma.
Your hint really helped. Indeed for some reason the VisualAge PersistenceBulder was sending executeQuery instead of executingUpdate. I had to change the way we constructed the QuerySpec and that solved the problem.