ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Balaji" <bal...@objectec.com>
Subject Re: Update Statement Error ?
Date Wed, 26 Apr 2006 16:14:19 GMT
RE: Update Statement Error ?If you are using sybase & jconnect here is what their error
guide says
 
JZ0SL


Unsupported SQL type _____.
Description: The application has declared a parameter to be of a type that jConnect does not
support.

Action: If possible, try declaring the parameter to be of a different type. Do not use Types.NULL
or PreparedStatement.setObject (null).

---------------------------------



  ----- Original Message ----- 
  From: Ali, Mohammed (Liquidity & Risk Technology) 
  To: user-java@ibatis.apache.org ; lmeadors@apache.org ; Balaji 
  Sent: Wednesday, April 26, 2006 10:54 AM
  Subject: RE: Update Statement Error ?


  Hi All, 
  I ran the update sql outside with the same values and no issues. 

  I have "null" data values in updates as column allows NULLS for VARCHAR. I think it is giving
error on "null" data. 

  Is there an issue in IBATIS with null data updating in Varchar field? 

  Thanks, 
  Ali 
  (201) 671-5499 



  -----Original Message----- 
  From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On Behalf Of Larry Meadors

  Sent: Wednesday, April 26, 2006 11:08 AM 
  To: user-java@ibatis.apache.org; Balaji 
  Subject: Re: Update Statement Error ? 



  Another quick-n-dirty way to find these (if you have a unit test) is 
  to remove columns from the update until it works. The last one you 
  removed is the problem. 

  Larry 



  On 4/26/06, Balaji <balaji@objectec.com> wrote: 
  > 
  > Ali, 
  > 
  > It could be because of null value(s) in password date etc. Check the 
  > datatype & acceptable value for fields in db table vs the dto.  Execute the 
  > SQL outside ibatis (winsql, plsql etc) with the values you are passing when 
  > this error is occuring.  That should give you a better error message. 
  > 
  > 
  > Balaji 
  > 
  > 
  > 
  > ----- Original Message ----- 
  > From: Ali, Mohammed (Liquidity & Risk Technology) 
  > To: user-java@ibatis.apache.org 
  > Sent: Wednesday, April 26, 2006 9:25 AM 
  > Subject: Update Statement Error ? 
  > 
  > 
  > 
  > 
  > Hi All, 
  > I am getting the following error when calling an Update. I can see UserDTO 
  > is passes properly with data. May be declaration is not right ? 
  > 
  > Error 
  > com.ibatis.common.jdbc.exception.NestedSQLException: 
  > --- The error occurred in 
  > com/ml/camsweb/resources/User.xml. 
  > --- The error occurred while applying a parameter map. 
  > --- Check the update-InlineParameterMap. 
  > --- Check the statement (update failed). 
  > --- Cause: java.sql.SQLException: JZ006: Caught IOException: 
  > java.io.IOException: JZ0SL: Unsupported SQL type 0. 
  > Caused by: java.sql.SQLException: JZ006: Caught IOException: 
  > java.io.IOException: JZ0SL: Unsupported SQL type 0. 
  > 
  > Update 
  > public void update(UserDTO userDTO) throws SQLException { 
  >                         try { 
  >                                 sqlMapCams.startTransaction(); 
  >                                 sqlMapCams.update("update",userDTO); 
  >                                 sqlMapCams.commitTransaction(); 
  >                         } finally{ 
  >                                 sqlMapCams.endTransaction(); 
  >                         } 
  >                 } 
  > 
  > User.XML 
  > <typeAlias alias="UserObject" type="com.ml.camsweb.dto.UserDTO"/> 
  > 
  > <update id="update" parameterClass="UserObject"> 
  >         UPDATE users 
  >         SET 
  >         first_name = #firstName#, 
  >         last_name = #lastName#, 
  >         phone = #phone#, 
  >         fax = #fax#, 
  >         e_mail = #email#, 
  >         location = #location#, 
  >         address1 = #address1#, 
  >         address2 = #address2#, 
  >         city = #city#, 
  >         state = #state#, 
  >         zip = #zip#, 
  >         password = #password#, 
  >                 password_last_updated = #password_last_updated# 
  >         WHERE user_id = #userId# 
  >     </update> 
  > 
  > 
  > Thanks, 
  > Ali 
  > (201) 671-5499 
  >  ________________________________ 
  > 
  > If you are not an intended recipient of this e-mail, please notify the 
  > sender, delete it and do not read, act upon, print, disclose, copy, retain 
  > or redistribute it. Click here for important additional terms relating to 
  > this e-mail.     http://www.ml.com/email_terms/ 
  >  ________________________________ 
  > 


------------------------------------------------------------------------------

  If you are not an intended recipient of this e-mail, please notify the sender, delete it
and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for
important additional terms relating to this e-mail.     http://www.ml.com/email_terms/

------------------------------------------------------------------------------

Mime
View raw message