Hi Fred,

Does mySQL allow place holders inside of functions for JDBC?  For example:

update jobs
    set clientid=?, summary=?, jobduedate=str_to_date(?)
where jobid=?

I ran into a similar problem with DB2 on the AS400/iSeries/i5.  Check
out the last entry on
http://opensource.atlassian.com/confluence/oss/display/IBATIS/Environment+Specific+Information

Ted


On 08/07/06, Fred Janon <[EMAIL PROTECTED]> wrote:
Hi,

I want to convert a string containing a date in the format dd/month/year
into a mySQL date format (YYYY/mm/dd) in an update statement. I tried:

  <mapped-statement name="saveJob">
    update jobs
        set clientid=#clientId#, summary=#summary#, 
jobduedate=str_to_date(#dueDate#, '%d/%m/%Y')
            where jobid=#id#
  </mapped-statement>

but it doesn't work or even generate an error, it jut stores 0000/00/00
in the my SQL DB. I enabled DEBUG on SQL statements and  apparently the
generated statement by iBatis is:

PreparedStatement: update jobs      set clientid=?, summary=?, jobduedate=?    
where jobid=?
Parameters: [2, Yellow banner 7, 10/10/2000, 3]

No sign of my function call at all.

Is there a way to get my function call working?

Thanks

Fred






Reply via email to