WebSphere/DB2 problems

Discussions

General J2EE: WebSphere/DB2 problems

  1. WebSphere/DB2 problems (3 messages)

    Hi,

    We are using WebSphere 3.54 with DB2 Universal version 7. We have a DataSource on WebSphere that has been in production for a very long time. Lately it has started throwing errors that make no sense. In one particular table two records can be successfully inserted but the app throws a "function sequence error" on the third attempted insert. Always the third attempt.

    Also, we will get an occassional " a host variable in the EXECUTE or OPEN statement is too large for its corresponding use" exception. Again this makes no sense because it is the same piece of code that makes sucessful inserts.

    Has anyone else experienced this?

    Does anyone know if the combination of WS 3.54/DB2 v7 has trouble with PreparedStatements?

    Does anyone still use WS 3.54? Should we upgrade?

    Thanks.

    Threaded Messages (3)

  2. WebSphere/DB2 problems[ Go to top ]

    Should I say welcome to the world of DB2 .... ;)

    DB2 is more strict when it comes to cursors/preparedStatements (and so is Sybase BTW)
    The "function sequence error " is solely because it looks like you are executing new SQLs without closing the resultset (or Preperedstatement) .
    We faced this problem when we executed multiple SQLs (all different ) and did not close the cursor (resultset or PS). Make sure you close the resultset before executing the new SQL . IT should not cause problem if you are executing the same SQL though .

    I am not sure of the other error as I never encountered it .

    Hope that helps
    Mohan
  3. WebSphere/DB2 problems[ Go to top ]

    And here is the reason for the second bug :

    DB2 doesn't like a SQL to select a data that is longer than defined .
  4. WebSphere/DB2 problems[ Go to top ]

    Thanks Mohan. We always close our connections and are very careful about tidying up after a data access call. We've come to the conclusion that our version of WebSphere does not handle PreparedStatements very well. So we are no longer using them. I have a feeling that if we upgraded to WS 5.0 the problem would end.

    Thanks again.