Hi Imre,

the probem meigth be come from the table or DB definition on AS400. So you
have to tell the AS400 JDBC Driver to use the correct date parameters.

      URL = "jdbc:as400:ipAddress;date format=iso;time format=iso";

You will find more informations here:;

http://publib.boulder.ibm.com/infocenter/systems/scope/i5os/topic/rzahh/rzahh.pdf

Cheers Gregor

IBM Global Business Services

Internet-Mail: [EMAIL PROTECTED]
Postal Mail:   Vulkanstrasse 106 (VK), Postfach, 8010 Zurich
Phone:            +41 58 333 69 21
Fax:                  +41 58 333 40 40
Natel:               +41 79 334 96 22



                                                                           
             Tokajac                                                       
             <[EMAIL PROTECTED]                                             
             il.com>                                                    To 
                                       [email protected]         
             02.12.2008 16:55                                           cc 
                                                                           
                                                                   Subject 
             Please respond to         AS400 Column Mapping Resultset DATE 
             [EMAIL PROTECTED]         TIME                                
                apache.org                                                 
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           





Hello!


I'm mapping columns of types DATE(10), TIME(8):

<parameterMap>
<parameter property="ORGDEPDT" jdbcType="DATE" javaType="java.sql.Date"
mode="OUT"/>
<parameter property="ORGDEPTM" jdbcType="TIME" javaType="java.sql.Time"
mode="OUT"/>
</parameterMap>

and i get Exception:

javax.servlet.ServletException:
--- The error occurred in
com/linehaul/persistence/sql/LineHaulManifests.xml.
--- The error occurred while applying a parameter map.
--- Check the ApplicationSP.Params.
--- Check the statement (update procedure failed).
--- Cause: java.sql.SQLException: [SQL0180] Syntax of date, time, or
timestamp value not valid. Cause . . . . . : The string representation of a
date, time, or timestamp value does not conform to the syntax for the
specified or implied data type and format. *N is either the character
string
constant that is not valid or the column or host variable that contained
the
string. If the name is *N, then the value is an expression specified in the
statement. If the string was found in a host variable, the host variable
number is 9. Recovery . . . : Ensure that the date, time, or timestamp
value
conforms to the syntax for the data type it represents. Try the request
again.
org.apache.struts.action.RequestProcessor.processE
xception(RequestProcessor.java:535)


I tried to combine java.util.Date; java.lang.String; java.sql.Date; but no
success so far.
I was changing the URL connection string also (date separator, date format,
time separator, time format  properties).

SELECT query called via query browser returns correct resultset, example:
Date: 2008-10-10
Time: 16.48.30

Any useful hint for solving this mapping problem?


Regards

P.S.
  If I can get data via SQL SELECT query, I believe that it can be reached
simply from Java/iBatis
--
View this message in context:
http://www.nabble.com/AS400-Column-Mapping-Resultset-DATE-TIME-tp20794393p20794393.html

Sent from the iBATIS - User - Java mailing list archive at Nabble.com.



Reply via email to