hi,
I've found some problems when dates are used in key fields.
I've a table with a date in key, used as a master in a relation master-detail.
In detail the date's value is taken from position string, so its format is like 'yyyy-MM-dd ....'.
Whem I try to do an insert op in detail, this value is parsed to fill the prepared statement, but the parse function doesn't know the real format. Strange enough, this problem seems not appearing on update operations.
The problem I see here is that using such a "heuristic" method (TimeUtil.parseDate) we fail to read the correct value in some cases.


Here a piece of log:

INFO-[25.03.2004 09:36:52]-[http8080-Processor4]-[org.dbforms.config.Table.getInsertStatement(Table.java:630)]-INSERT INTO TIMEPLAN (TIME,REMARK) VALUES (?,?)
INFO-[25.03.2004 09:36:52]-[http8080-Processor4]-[org.dbforms.config.Table.getInsertStatement(Table.java:630)]-INSERT INTO TIMEPLAN (TIME,REMARK) VALUES (?,?)
DEBUG-[25.03.2004 09:36:52]-[http8080-Processor4]-[org.dbforms.event.datalist.dao.DataSourceJDBC.fillWithData(DataSourceJDBC.java:396)]-Retrieved curField:TIME type:91
DEBUG-[25.03.2004 09:36:52]-[http8080-Processor4]-[org.dbforms.event.datalist.dao.DataSourceJDBC.fillWithData(DataSourceJDBC.java:396)]-Retrieved curField:TIME type:91
DEBUG-[25.03.2004 09:36:52]-[http8080-Processor4]-[org.dbforms.util.MessageResource.getMessage(MessageResource.java:121)]-not found: dbforms.pattern.date
DEBUG-[25.03.2004 09:36:52]-[http8080-Processor4]-[org.dbforms.util.MessageResource.getMessage(MessageResource.java:121)]-not found: dbforms.pattern.date
DEBUG-[25.03.2004 09:36:52]-[http8080-Processor4]-[org.dbforms.util.MessageResource.getMessage(MessageResource.java:121)]-not found: dbforms.pattern.date
DEBUG-[25.03.2004 09:36:52]-[http8080-Processor4]-[org.dbforms.util.MessageResource.getMessage(MessageResource.java:121)]-not found: dbforms.pattern.date
ERROR-[25.03.2004 09:36:53]-[http8080-Processor4]-[org.dbforms.util.TimeUtil.saveParseDate(TimeUtil.java:154)]-java.text.ParseException: Unparseable date: "2000-01-12"
ERROR-[25.03.2004 09:36:53]-[http8080-Processor4]-[org.dbforms.util.TimeUtil.saveParseDate(TimeUtil.java:154)]-java.text.ParseException: Unparseable date: "2000-01-12"
ERROR-[25.03.2004 09:36:53]-[http8080-Processor4]-[org.dbforms.util.TimeUtil.saveParseTime(TimeUtil.java:200)]-java.text.ParseException: Unparseable date: "00:00:00.0"
ERROR-[25.03.2004 09:36:53]-[http8080-Processor4]-[org.dbforms.util.TimeUtil.saveParseTime(TimeUtil.java:200)]-java.text.ParseException: Unparseable date: "00:00:00.0"
INFO-[25.03.2004 09:36:53]-[http8080-Processor4]-[org.dbforms.util.TimeUtil.parseDate(TimeUtil.java:274)]-parsed 2000-01-12 00:00:00.0 to 21/08/09
INFO-[25.03.2004 09:36:53]-[http8080-Processor4]-[org.dbforms.util.TimeUtil.parseDate(TimeUtil.java:274)]-parsed 2000-01-12 00:00:00.0 to 21/08/09
INFO-[25.03.2004 09:36:53]-[http8080-Processor4]-[org.dbforms.event.datalist.dao.DataSourceJDBC.fillWithData(DataSourceJDBC.java:425)]-field=TIME col=1 value=2009-08-21 type=91
INFO-[25.03.2004 09:36:53]-[http8080-Processor4]-[org.dbforms.event.datalist.dao.DataSourceJDBC.fillWithData(DataSourceJDBC.java:425)]-field=TIME col=1 value=2009-08-21 type=91



cheers, Sergio Moretti



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to