ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krishnamoorthi, Sruthi (Raytheon)" <Sruthi.Krishnamoor...@USPTO.GOV>
Subject RE: Urgent help required
Date Fri, 10 Mar 2006 17:54:53 GMT
This is throwing an exception because 

Integer test = (Integer)sqlMap.insert(qryId,usr);

System.out.println("Return value from Insert"+test); id displaying Null value:

But a record is getting inserted in Database. //For sure 
How to confirm that my record got inserted.

Sruthi Krishnamoorthi 
537 A - (Raytheon) Location 

-----Original Message-----
From: Nathan.Maves@Sun.COM [mailto:Nathan.Maves@Sun.COM]
Sent: Friday, March 10, 2006 12:52 PM
To: user-java@ibatis.apache.org
Subject: Re: Urgent help required
Importance: High

Just use 

Integer rows = ((Integer)sqlMap.insert("insertProduct", product)).intValue();

if you are using Java 1.5

int rows = (Integer)sqlMap.insert("insertProduct", product);


On Mar 10, 2006, at 10:41 AM, Krishnamoorthi, Sruthi (Raytheon) wrote:

The docs says 

        int rows = sqlMap.insert (“insertProduct”, product);

returns a int value


When I code it ,the return value is object. I am not able to get the int return value. Please
help me out.


Sruthi Krishnamoorthi 
537 A - (Raytheon) Location 


View raw message