0 Replies Latest reply on Aug 19, 2003 10:46 AM by Jerrold Eads

    Optimistic Locking problem when using SQL Server 2000

    Jerrold Eads Newbie

      When using SQL Server with JBOSS 3.2.1 the following problem occurs.

      When updating a optimistically locked field that has an intital value of null the update fails.

      The problem is:

      JDBCStoreEntityCommand.java
      00108 sql.append(" WHERE ").append(SQLUtil.getWhereClause(whereFields));


      String jdbc::SQLUtil::getWhereClause ( List fields ) [inline, static]

      Returns columnName0=? [AND columnName1=? [AND columnName2=? [...]]]

      In SQLServer2000 if a field is null the syntax has to be

      columnName is ? where ? equals null.

      The columnName=? syntax fails the update.

      Does anyone know a work around for this syntax problem?