0 Replies Latest reply on May 20, 2002 7:18 PM by natalie wang

    Got null for Sybase Datetime

    natalie wang Newbie

      I am using JBoss1.4.4 CMP and sybase11.
      I have one table:
      CREATE TABLE test_table
      (
      id int NOT NULL,
      date1 datetime NULL,
      date2 datetime NOT NULL,
      )

      In jaws.xml:
      <cmp-field>
      <field-name>date1</field-name>
      <column-name>date1</column-name>
      <java-type>java.util.Date</java-type>
      <jdbc-type>TIMESTAMP</jdbc-type>
      <sql-type>DATETIME</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>date2</field-name>
      <column-name>date2</column-name>
      <java-type>java.util.Date</java-type>
      <jdbc-type>TIMESTAMP</jdbc-type>
      <sql-type>DATETIME</sql-type>
      </cmp-field>

      Everything works fine for date1. However I got null for date2 even they both have values in database. The two fields are very similar in all the places. The only difference is the definition. One can be null, the other can not in the database.

      Any hint is helpful.

      Thank you in advance.

      Natalie