Hello,

i use OJB 1.0 rc2, MS SQL Server 2000 on WIN2K with the MS JDBC driver and have a date 
field:

    <field-descriptor
         name="edatum"
         column="EDATUM"
         jdbc-type="DATE"
    />

with the corresponding data type DATETIME in the datebase, which can stores date and 
time information in one field.
When i issue an INSERT that only has date information (like '2003-03-04') and execute 
a subsequent SELECT with a WHERE clause like field='2003-03-04' i do not get any 
result (all through OJB naturally).

As far as i found out for the leading INSERT the (not given) time part is generated as 
12:00:00.000, the SELECT looks for a DATETIME value with the time part like 
00:00:00.000. and does not find any rows.

Can somebody explain to me, how the generation of time parts is working or if i can 
configure this. Is it happening inside OJB (i don't think as is examined the p6spy 
log), the sql server or inside the jdbc driver (which i suspect, because the same 
example in query analyzer works).

What can i do to work around this problem? Thank you for any suggestions.

Regards
Max



Reply via email to