Ok. I will try turning the logging on and
see what the actual SQL is. Thanks for your help. I will post my results soon. From: Jeff Butler
[mailto:[EMAIL PROTECTED] I think you need to turn on logging and see what's actually being
sent to the DB. Something is messed up, but it's hard to tell what it is. Jeff Butler On 1/26/06, Bondre,
Prathit <[EMAIL PROTECTED]>
wrote: Hi Jeff, I have tried that as well. I am able to run it if I hard code the value. So my string
format seems to be ok. For e.g. If I change my query to Insert into table it works. But as
soon as I pass it as a string in the hashmap it gives me the data type mismatch
error. From: Jeff Butler [mailto: [EMAIL PROTECTED]] My guess
is that you've not really got the String format for a Date right for your
database. It is notoriously difficult to specify a String for a
date. You might try to prototype the insert statement in some interactive
database client (like squirrel) to get it working before you try the iBATIS
stuff. You
probably also need to do a "cast" - use the database function to
convert a String to a date. If you were using DB2, it would look like
this: Insert
into table Where
'yyyynnn' is a Julian date. Jeff
Butler On
1/26/06, Bondre, Prathit < [EMAIL PROTECTED] > wrote:
Hi Jeff, Thanks for your response. I tried that as well but when I pass in a String with the
database specific format it give me a cast mismatch error. "Value not compatible with the datatype of its
assignment target". Any ideas? |