1 Reply Latest reply on Nov 15, 2002 4:24 PM by flandry

    MS SQL Server typemappings

    kobalt

      In the standardjbosscmp-jdbc.xml file, for a MS SQL Server database, the java.sql.Timestamp type is mapped to a MS SQL Server TIMESTAMP type.

      However, the MS SQL Server TIMESTAMP type is specific to MS SQL Server, it is not compatible with the SQL '92 TIMESTAMP type. In fact, it is some sort of auto-number field, and only one column per table can be of this type.

      The MS SQL Server JDBC driver documentation translates the JDBC type TIMESTAMP into the MS SQL Server type SMALLDATETIME.

      Should the mapping in the standardjbosscmp-jdbc.xml then not be:


      <java-type>java.sql.Timestamp</java-type>
      <jdbc-type>TIMESTAMP</jdbc-type>
      <sql-type>SMALLDATETIME</sql-type>

        • 1. Re: MS SQL Server typemappings
          flandry

          We had the same problem here. We were getting errors about more than one column having a TIMESTAMP from our JDBC driver for MS SQL Server. We mapped TIMESTAMP to DATETIME in standardjaws.xml and this seems to have done the trick.