[Opensource] Type Mapping SQL Server 2000.
Dave Smith
davsmith at nbnet.nb.ca
Thu Jun 6 18:07:57 PDT 2002
Hi,
I'm trying to figure out the type mapping for SQL Server 2000.
I'm using the MS JDBC driver.
This mapping got me past the multiple identity field error, mentioned in
a previous post.
<type-mapping>
<java-type>INTEGER</java-type>
<db-type>int</db-type>
</type-mapping>
However now I'm having trouble finding a mapping for DATE.
According to the following documentation from MS on their JDBC datatypes,
SQL server's datetime maps to the JDBC's timestamp.
Table 3-2. SQL Server 2000 Data Types
SQL Server Data | Type JDBC Data Type
bigint | BIGINT
bigint identity | BIGINT
binary | BINARY
bit | BIT
char | CHAR
datetime | TIMESTAMP
Based on this I used the following mapping in my expresso-config.xml but
its no worky worky.
<type-mapping>
<java-type>TIMESTAMP</java-type>
<expresso-type>DATE</expresso-type>
<db-type>datetime</db-type>
</type-mapping>
but it produces the following error.
"javax.servlet.ServletException: There was no mapping of the java.sql.Type.DATE type to a specific database type. Either this type is not supported by the specified JDBC driver, or there should be an type mapping entry in expresso-config.xml"
Anyone have any suggestions???
Thanks,
Dave
More information about the Opensource
mailing list