Title: MS SQLServer Date type mapping in standardjbosscmp-jdbc.xml

In JBoss3.0 final, the type mapping in standardjbosscmp-jdbc.xml
for java.util.Date for MS SQLServer2000 and 7.0 is given as:

<mapping>
    <java-type>java.util.Date</java-type>
    <jdbc-type>DATE</jdbc-type>
    <sql-type>DATETIME</sql-type>
</mapping>

while for other databases such as Oracle and MySQL the <jdbc-type> is
TIMESTAMP.  I'm using the JDBC driver that MS provides, and with that
driver and the default SQLServer mapping, dates get put into the
database (a DATETIME field) with no time information, only the date
part.  I expect that because that's what a <jdbc-type> of DATE should
do.  When I change the <jdbc-type> to TIMESTAMP, I get, again as
expected, the full date and time information in the database.  I was
wondering if the default setting for SQLServer for java.util.Date
should be TIMESTAMP instead of DATE?

Thanks,

Bruce Roberts
[EMAIL PROTECTED]



Reply via email to