The return value is the result of a <selectKey> element if there is one, or null - NOT the number of rows.
Jeff Butler
On 3/10/06, Krishnamoorthi, Sruthi (Raytheon) <[EMAIL PROTECTED]> wrote:
This is throwing an exception becauseInteger 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 sureHow to confirm that my record got inserted.Thanks,
Sruthi Krishnamoorthi
703-562-9732(Work)
537 A - (Raytheon) Location-----Original Message-----Just use
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 10, 2006 12:52 PM
To: [email protected]
Subject: Re: Urgent help required
Importance: High
Integer rows = ((Integer)sqlMap.insert("insertProduct", product)).intValue();
if you are using Java 1.5
int rows = (Integer)sqlMap.insert("insertProduct", product);
Nathan
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.
Thanks,
Sruthi Krishnamoorthi
703-562-9732(Work)
537 A - (Raytheon) Location
