RE: Inserting null value in ibatis

2009-03-25 Thread Rahul Saluja
yourself in the code . Regards Rahul From: Sekar, Sowmya [mailto:sse...@ucsd.edu] Sent: Wednesday, March 25, 2009 10:27 PM To: user-java@ibatis.apache.org Subject: Inserting null value in ibatis Hi, I am trying to insert null value for a column and it throws the

Re: Inserting null value in ibatis

2009-03-25 Thread Nicholoz Koka Kiknadze
In the manual we read: The *jdbcType* element is used to specify the JDBC type of the parameter. The value must be one of the types listed in java.sql.Types (VARCHAR, INTEGER, etc.) Generally the *jdbcType* element is needed if there is a possibility that the value could be NULL, or to specify t

Inserting null value in ibatis

2009-03-25 Thread Sekar, Sowmya
Hi, I am trying to insert null value for a column and it throws the following exception 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: Unsuppor

Re: Error while inserting Null value into MsSQL db

2006-07-26 Thread Larry Meadors
Try:insert into USR_BASIC_INFO values (#userid#, #password:VARCHAR#, #username#, #role#, #code#, #email#, #phonenumber#, #description#)LarryOn 7/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:   Hi,      I am using Ibatis as the data mapper between my java classes and MsSql database. When

Error while inserting Null value into MsSQL db

2006-07-26 Thread rambabu.piridi
  Hi,      I am using Ibatis as the data mapper between my java classes and MsSql database. When I am trying to insert null value using java object   i am getting the null pointer exception.      but if i directly insert null it works fine.     For example:   Re: inserting null
Hmm, that's what I would have thought, but my co-worker was getting a null pointer when he tried to do that. Might this be because the property is an Integer and something is calling intValue on it? He changed his getter to return -1 instead of null, and configured the sqlmap to insert null fo

Re: inserting null

That is the default behavior. Larry On 7/13/06, Ben Munat <[EMAIL PROTECTED]> wrote: I see in the user's manual how one can tell ibatis to interpret a given property value as meaning it should insert null into the column... like an int value of - means insert null. What I don't see, how

inserting null

I see in the user's manual how one can tell ibatis to interpret a given property value as meaning it should insert null into the column... like an int value of - means insert null. What I don't see, however, is how to tell ibatis that a null value for a property means insert a null. So, for

RE: error inserting null values to database

http://opensource2.atlassian.com/confluence/oss/display/IBATIS/What+caus es+an+Invalid+column+type+error+with+Oracle -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: maandag 31 oktober 2005 17:17 To: user-java@ibatis.apache.org Subject: error inserting null

error inserting null values to database

Hi I'm having trouble inserting null values into my database. The table allows nulls but when I supply a parameterMap with null values in it I get the folloing exception: java.sql.SQLException: Invalid column type at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError

Re: Inserting null into SQLServer DATETIME field

Those should be one of the constants from the java.sql.Types class. Larry On 10/19/05, Matthew Hegarty <[EMAIL PROTECTED]> wrote: > > Thanks - that seems to have sorted it. > For some reason I thought you specified the DB field type in the mapping, > not the java type. >

RE: Inserting null into SQLServer DATETIME field

Title: Inserting null into SQLServer DATETIME field Thanks - that seems to have sorted it. For some reason I thought you specified the DB field type in the mapping, not the java type. From: Niels Beekman [mailto:[EMAIL PROTECTED] Sent: 19 October 2005 10:06To: user-java

RE: Inserting null into SQLServer DATETIME field

Title: Inserting null into SQLServer DATETIME field Hi,   java.sql.Types.DATETIME does not exist in Java 1.4, we use TIMESTAMP, see the API of your Java-version…   Niels   From: Matthew Hegarty [mailto:[EMAIL PROTECTED] Sent: woensdag 19 oktober 2005 11:01 To: user-java

Inserting null into SQLServer DATETIME field

Title: Inserting null into SQLServer DATETIME field All I am having trouble inserting null values into a SQL Server DATETIME field. I have specified the following mapping:     insert into TASK_INSTANCES (START_DATETIME, END_DATETIME, ID_TASK_TYPE, ID_TASK_STATE)     values

Re: Postgres - inserting null causes error - Unknown Types value

: Tuesday, September 13, 2005 12:35 PM Subject: RE: Postgres - inserting null causes error - Unknown Types value I do not know PostgreSql very well, but could it be that you have to explicitly specify the JDBC-type, as in Oracle?   Niels   From: Zarar Siddiqi

Re: Postgres - inserting null causes error - Unknown Types value

In my DAOiBatis, I check if idDivers is not null before update. May be it is not usefull to write WHERE     i_divers = #idDivers:Long# but simply WHERE     i_divers = #idDivers# Darek Dober a écrit : From my perspective, it should be ok.   But: WHERE     i_divers = #idD

Re: Postgres - inserting null causes error - Unknown Types value

From my perspective, it should be ok.   But: WHERE     i_divers = #idDivers:Long#   you shouldn't update something, if you don't know which record you want to update (if idDivers is null :)     Have you tried this ?   Cheers Darek

Re: Postgres - inserting null causes error - Unknown Types value

- From: TNO To: user-java@ibatis.apache.org Sent: Wednesday, September 14, 2005 9:22 AM Subject: Re: Postgres - inserting null causes error - Unknown Types value This is much shorter... thanks Darek ;-) Darek Dober a écrit : I

Re: Postgres - inserting null causes error - Unknown Types value

- inserting null causes error - Unknown Types value This is much shorter...thanks Darek ;-) Darek Dober a écrit : I read somewhere in docs, that is caused because jdbc driver 8.xx is almost full implementation of JDBC Type 3, which uses prepareStatement in contrast to

Re: Postgres - inserting null causes error - Unknown Types value

-java@ibatis.apache.org Sent: Tuesday, September 13, 2005 10:18 AM Subject: Re: Postgres - inserting null causes error - Unknown Types value To avoid this, I create a parameterMap for my insert and update. Niels Beekman a écrit : I do not

Re: Postgres - inserting null causes error - Unknown Types value

reate parameterMap just specify the type like:   insert into table(column) values (#column:INTEGER)   which is much shorter:)   Darek Dober - Original Message - From: TNO To: user-java@ibatis.apache.org Sent: Tuesday, September 13, 2005 10:18 AM Subject: Re: Postgres - inserting

Re: Postgres - inserting null causes error - Unknown Types value

]] Sent: dinsdag 13 september 2005 15:15 To: user-java@ibatis.apache.org Subject: Postgres - inserting null causes error - Unknown Types value   I'm having a problem with iBatis using PostgreSql.   I have an insert statment, "insertEndUser" which I p

RE: Postgres - inserting null causes error - Unknown Types value

I do not know PostgreSql very well, but could it be that you have to explicitly specify the JDBC-type, as in Oracle?   Niels   From: Zarar Siddiqi [mailto:[EMAIL PROTECTED] Sent: dinsdag 13 september 2005 15:15 To: user-java@ibatis.apache.org Subject: Postgres - inserting null

Postgres - inserting null causes error - Unknown Types value

I'm having a problem with iBatis using PostgreSql.   I have an insert statment, "insertEndUser" which I pass an "EndUser" object to for inserting.  If all the properties of the EndUser object are non-null, the insert works fine, but if ANY of them are null, I get the following exception, (in