Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 67373 invoked from network); 10 Mar 2006 18:15:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Mar 2006 18:15:28 -0000 Received: (qmail 44003 invoked by uid 500); 10 Mar 2006 18:15:26 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 43985 invoked by uid 500); 10 Mar 2006 18:15:26 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 43974 invoked by uid 99); 10 Mar 2006 18:15:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Mar 2006 10:15:26 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [63.71.228.76] (HELO smtpedge1.uspto.gov) (63.71.228.76) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Mar 2006 10:15:25 -0800 Received: from EMFSERVER1 (emfserver1.uspto.gov [10.240.6.74]) by smtpedge1.uspto.gov (Tumbleweed MailGate) with ESMTP id 8C151E01643E for ; Fri, 10 Mar 2006 13:12:38 -0500 (EST) Received: from 10.112.161.154 by EMFSERVER1 with ESMTP (Tumbleweed Email Firewall SMTP Relay (Email Firewall v6.2.0)); Fri, 10 Mar 2006 13:16:37 -0500 X-Server-Uuid: A4AFE6A8-ACB5-4096-9177-6557516E3F90 Received: from exchange3.uspto.gov ([10.112.171.194]) by uspto-smtp-1.uspto.gov with Microsoft SMTPSVC(6.0.3790.1830); Fri, 10 Mar 2006 13:14:46 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message MIME-Version: 1.0 Subject: RE: Urgent help required Date: Fri, 10 Mar 2006 13:14:46 -0500 Message-ID: <8AED8A2865F7064989119502BD85729D5818B8@EXCHANGE3.uspto.gov> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Urgent help required Thread-Index: AcZEbltufm394nR9TCyFXuD4O3ZtRgAABMWQ From: "Krishnamoorthi, Sruthi (Raytheon)" To: user-java@ibatis.apache.org X-OriginalArrivalTime: 10 Mar 2006 18:14:46.0624 (UTC) FILETIME=[8347A600:01C6446E] X-WSS-ID: 680F1DF52HC18567289-03-01 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6446E.83328E72" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C6446E.83328E72 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable If this is the case Y all doc's of Ibatis are statting that it returns a = int return value. =20 Thanks,=20 Sruthi Krishnamoorthi=20 703-562-9732(Work)=20 537 A - (Raytheon) Location=20 -----Original Message----- From: Jeff Butler [mailto:jeffgbutler@gmail.com] Sent: Friday, March 10, 2006 1:13 PM To: user-java@ibatis.apache.org Subject: Re: Urgent help required Yes - or you could do a select to verify if you don't trust your = database or JDBC driver's exception handling. =20 Jeff Butler =20 On 3/10/06, Krishnamoorthi, Sruthi (Raytheon) < = Sruthi.Krishnamoorthi@uspto.gov> wrote:=20 Do you mean to say if there is no exception then insert worked. Is this the only way to confirm. =20 Thanks,=20 Sruthi Krishnamoorthi=20 703-562-9732(Work)=20 537 A - (Raytheon) Location=20 -----Original Message----- From: Jeff Butler [mailto: = jeffgbutler@gmail.com] Sent: Friday, March 10, 2006 1:08 PM To: user-java@ibatis.apache.org =20 Subject: Re: Urgent help required You woldn't - is used for automatically generated keys (like = identity fields or sequences). In your case, the insert worked if no = exception is thrown. =20 Jeff Butler =20 On 3/10/06, Krishnamoorthi, Sruthi (Raytheon) < = = Sruthi.Krishnamoorthi@uspto.gov> wrote:=20 How to use that select key to tell if my values are inserted or not. =20 INSERT INTO = PARTICIPANT(PRTCPNT_ID,GIVEN_NM,MIDDLE_NM,FAMILY_NM,NAME_LINE_ONE_TX, = CITIZENSHIP,STREET_LINE_ONE_TX,STREET_LINE_TWO_TX, = CITY_NM,GEOGRAPHIC_REGION_CD,COUNTRY_CD,POSTAL_CD,PRIMARY_TELEPHONE_NO,PR= IMARY_EMAIL_ADDRESS_TX,PASSWORD_TX,=20 = LAST_MODIFIED_USER_ID,LAST_MODIFIED_TS) VALUES((select NVL(max(PRTCPNT_ID)+1,1)userId from PARTICIPANT), = #fname#,#mname#,#lname#,#fname#,#citizenShip#,#street1#,#street2#,#city#,= #state#,#country#,#postalCode#,#phone#,#email#,#password#,'US1234',SYSDAT= E)=20 Where would I use it here and how Thanks, Sruthi Krishnamoorthi 703-562-9732(Work) 537 A - (Raytheon) Location -----Original Message----- From: larry.meadors@gmail.com [mailto: larry.meadors@gmail.com]On Behalf Of Larry Meadors Sent: Friday, March 10, 2006 12:58 PM=20 To: user-java@ibatis.apache.org Subject: Re: Urgent help required I think you only get a value back if you use selectKey.=20 Larry On 3/10/06, Krishnamoorthi, Sruthi (Raytheon) < = Sruthi.Krishnamoorthi@uspto.gov > wrote: > > This is throwing an exception because > > > Integer test =3D (Integer)sqlMap.insert(qryId,usr); > > System.out.println("Return value from Insert"+test); id displaying = Null=20 > value: > But a record is getting inserted in Database. //For sure > How to confirm that my record got inserted. > > > Thanks, > Sruthi Krishnamoorthi > 703-562-9732(Work)=20 > 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=20 > > > Integer rows =3D ((Integer)sqlMap.insert("insertProduct", > product)).intValue();=20 > > > if you are using Java 1.5 > > > int rows =3D (Integer)sqlMap.insert("insertProduct",=20 > product); > > > Nathan > > > > > > On Mar 10, 2006, at 10:41 AM, Krishnamoorthi, Sruthi (Raytheon) wrote: > > > > > The docs says=20 > > int rows =3D sqlMap.insert ("insertProduct", product);=20 > > returns a int value > > > > When I code it ,the return value is object. I am not able to get the = int=20 > return value. Please help me out. > > > Thanks, > Sruthi Krishnamoorthi=20 > 703-562-9732(Work) > 537 A - (Raytheon) Location > > > ------_=_NextPart_001_01C6446E.83328E72 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
If=20 this is the case Y all doc's of Ibatis are statting that it returns a = int return=20 value.
 

Thanks,
Sruthi Krishnamoorthi
703-562-9732(Work)
537 A -=20 (Raytheon) Location

-----Original Message-----
From: Jeff Butler=20 [mailto:jeffgbutler@gmail.com]
Sent: Friday, March 10, 2006 = 1:13=20 PM
To: user-java@ibatis.apache.org
Subject: Re: = Urgent=20 help required

Yes - or you could do a select to verify if you don't trust your = database=20 or JDBC driver's exception handling.
 
Jeff Butler

 
On 3/10/06, Krishnamoorthi, Sruthi (Raytheon) <Sruthi.Krishnamoorthi@usp= to.gov>=20 wrote:=20
Do you mean = to say if there=20 is no exception then insert worked.
Is this the = only way to=20 confirm.
 

Thanks,
Sruthi Krishnamoorthi
703-562-9732(Work)
537 A -=20 (Raytheon) Location

-----Original=20 Message-----
From: Jeff Butler [mailto:=20 jeffgbutler@gmail.com]
Sent: Friday, March 10, 2006 = 1:08=20 PM
To: user-java@ibatis.apache.org =
Subject: Re:=20 Urgent help required

You woldn't - <selectKey> is used for automatically = generated=20 keys (like identity fields or sequences).  In your case, the = insert=20 worked if no exception is thrown.
 
Jeff Butler

 
On 3/10/06, Krishnamoorthi, Sruthi (Raytheon) = <=20 Sruthi.Krishnamoorthi@uspto.gov> wrote:=20
How=20 to use that select key to tell if my values are inserted or=20 not.
<insert id=3D"insertCCUser" = parameterClass=3D"user">=20
       INSERT INTO=20 = PARTICIPANT(PRTCPNT_ID,GIVEN_NM,MIDDLE_NM,FAMILY_NM,NAME_LINE_ONE_TX,
=             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;     =20 = CITIZENSHIP,STREET_LINE_ONE_TX,STREET_LINE_TWO_TX,
   &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;            = ;  =20 = CITY_NM,GEOGRAPHIC_REGION_CD,COUNTRY_CD,POSTAL_CD,PRIMARY_TELEPHONE_NO,PR= IMARY_EMAIL_ADDRESS_TX,PASSWORD_TX,=20 =
           &nb= sp;           &nbs= p;            = ;            =       =20 = LAST_MODIFIED_USER_ID,LAST_MODIFIED_TS)
     =  =20 VALUES((select NVL(max(PRTCPNT_ID)+1,1)userId from=20 = PARTICIPANT),
         &n= bsp;           &nb= sp;=20 = #fname#,#mname#,#lname#,#fname#,#citizenShip#,#street1#,#street2#,#city#,= #state#,#country#,#postalCode#,#phone#,#email#,#password#,'US1234',SYSDAT= E)=20
</insert>

Where would I use it here and=20 how

Thanks,
Sruthi = Krishnamoorthi
703-562-9732(Work)
537=20 A - (Raytheon) Location


-----Original = Message-----
From:=20 larry.meadors@gmail.com [mailto:larry.meadors@gmail.com]On Behalf
Of = Larry=20 Meadors
Sent: Friday, March 10, 2006 12:58 PM
To: user-java@ibatis.apache.org
Subject: Re: = Urgent=20 help required


I think you only get a value back if = you use=20 selectKey.

Larry


On 3/10/06, Krishnamoorthi, = Sruthi=20 (Raytheon)
< = Sruthi.Krishnamoorthi@uspto.gov > wrote:
>
> = This is=20 throwing an exception because
>
>
> Integer = test =3D=20 (Integer)sqlMap.insert(qryId,usr);
>
>=20 System.out.println("Return value from Insert"+test); id = displaying Null=20
> value:
> But a record is getting inserted in = Database.=20 //For sure
> How to confirm that my record got=20 inserted.
>
>
> Thanks,
> Sruthi=20 Krishnamoorthi
> 703-562-9732(Work)
> 537 A - = (Raytheon)=20 Location
>
> -----Original Message-----
> = From: Nathan.Maves@Sun.COM=20 [mailto:Nathan.Maves@Sun.COM=20 ]
> Sent: Friday, March 10, 2006 12:52 PM
> To: = user-java@ibatis.apache.org
> Subject: = Re:=20 Urgent help required
> Importance: High
>
> = Just use=20
>
>
> Integer rows =3D=20 ((Integer)sqlMap.insert("insertProduct",
> = product)).intValue();=20
>
>
> if you are using Java=20 1.5
>
>
> int rows =3D=20 (Integer)sqlMap.insert("insertProduct",
>=20 product);
>
>
>=20 Nathan
>
>
>
>
>
> On Mar = 10, 2006,=20 at 10:41 AM, Krishnamoorthi, Sruthi (Raytheon)=20 wrote:
>
>
>
>
> The docs says=20
>
>         = int=20 rows =3D sqlMap.insert ("insertProduct", product); =
>
>=20 returns a int value
>
>
>
> When I code = it ,the=20 return value is object. I am not able to get the int
> = return=20 value. Please help me out.
>
>
> = Thanks,
>=20 Sruthi Krishnamoorthi
> 703-562-9732(Work)
> 537 A = -=20 (Raytheon)=20 = Location
>
>
>




------_=_NextPart_001_01C6446E.83328E72--