CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge -> Programming

 Update form with Oracle date

Print topic Send  topic

Author Message
Oracle Date Problem
Posted: 12/17/2004, 1:15 PM

I have an update form which includes an Oracle date field. Whenever I try to submit an update to a record, it throws the following error:
java.sql.SQLException: ORA-01861: literal does not match format string

I am assuming I need to use the Oracle TO_DATE function to format this string into date format as part of the update process. I believe I need to make this change in this section of my jsp code:
sSQL = "update WQ_WORK_QUEUE set " +
"WQID=" + toSQL(fldWQID, Number_TYPE) +
",FOLLOWUP=" + toSQL(fldfollowup, Date_TYPE) +
",STATUSID=" + toSQL(fldSTATUSID, Number_TYPE) +
",NOTES=" + toSQL(fldnotes, Memo_TYPE);
sSQL = sSQL + " where " + sWhere;
break;

Can someone assist me with the proper syntax to update the FOLLOWUP field with TO_DATE. Any other suggestions are also appreciated.

Using CC 2.07 - JSP
Jon
Posted: 12/20/2004, 12:06 PM

Try this...

",FOLLOWUP=to_date(" + toSQL(fldfollowup, Date_TYPE) + ",'yyyy-mm-dd HH24:MI:SS')"

caveat: I'm neither a Java nor an Oracle specialist, but this is essentially what I use to insert records into our Oracle DB via PHP.
Brian Hoogeveen
Posted: 01/03/2005, 1:38 PM

Thanks, this formatted worked for me. Appreciate the help

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.