1 Reply Latest reply on Jun 10, 2003 1:48 PM by nicolas frank

    pbl sql server cmp, preparedStatements and null, help please

    nicolas frank Newbie


      I have a very worrying problem. I am using JBOSS 3.2.1 with SQLServer 2000.

      When I (or the CMP engine) perform a preparedStatement with a null parameter (I use the setNull and I guess the CMP engine also does), the database handle it as an empty value and not as a NULL... I have tried with several jdbc drivers (oracle, datadirect, ...) so I am confortable saying it doesn't come from the driver but from the database.

      Does anyone met this kind of problem ? Any idea ?

      This is a very serious issue for me, so thank's for helping me.


      SELECT id from TEST where username=? AND somefield=? with first arg = TEST and second arg is NULL does not work ... (of course with IS NULL it's ok... but does not really help)