Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 50742 invoked from network); 21 Sep 2007 17:45:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Sep 2007 17:45:48 -0000 Received: (qmail 83356 invoked by uid 500); 21 Sep 2007 17:45:37 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 83345 invoked by uid 500); 21 Sep 2007 17:45:37 -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 83334 invoked by uid 99); 21 Sep 2007 17:45:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2007 10:45:37 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of brandon.goodin@gmail.com designates 209.85.162.178 as permitted sender) Received: from [209.85.162.178] (HELO el-out-1112.google.com) (209.85.162.178) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2007 17:45:36 +0000 Received: by el-out-1112.google.com with SMTP id z25so202087ele for ; Fri, 21 Sep 2007 10:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=+IcqgtSL7zXZRYU/qWno1RFf7cbTpxd2x42eKVIzyQY=; b=N/pK3Ehk172gdwUr7f+u64uhub9VnvtUsMxPC3HOkrbpueTIeVlCNde/KF0BIcFPArx6poRI9agr05M2+bIAEP8WqMcWzekCjGreUYFEbHepuswDD++Ep3ieX6r3b8iFsLmFysk/AsbSssrMj06qWnyO7wLG4YIWff9+TDv874c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=QIj6oJ/C/dAxMx3IuZagdtW7lm7c4I09PnkeuQ8e0LCAC+mJKZ8alFmAIcvVlQ8tTJ+10E+QPRqPX7JltWbfwgKQKAwxkPkbAmPUncxhOizQ/3VKo+98W4JYRzS+UHpAVM+2G6GpQrH8UE7piqrkARpMXli49JA7X498AAPlQtM= Received: by 10.114.13.1 with SMTP id 1mr3770242wam.1190396714079; Fri, 21 Sep 2007 10:45:14 -0700 (PDT) Received: by 10.114.102.14 with HTTP; Fri, 21 Sep 2007 10:45:13 -0700 (PDT) Message-ID: <2fe5ef5b0709211045h63744f8bs565af0df94aca196@mail.gmail.com> Date: Fri, 21 Sep 2007 12:45:13 -0500 From: "Brandon Goodin" To: user-java@ibatis.apache.org Subject: Re: insert always returning null (urgent ) In-Reply-To: <5EBE57594E74E84DB1DC6BA8E279389D060E9D65@SOS-MAILSRV.ascindia.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_36013_5905942.1190396714070" References: <5EBE57594E74E84DB1DC6BA8E279389D060E9D63@SOS-MAILSRV.ascindia.com> <5EBE57594E74E84DB1DC6BA8E279389D060E9D65@SOS-MAILSRV.ascindia.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_36013_5905942.1190396714070 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Yuvraj, I'd be happy to train you one on one on how to use iBATIS. Feel free to contact me and i can provide you my billable rate. However, your best bet is to read the manual first. It is located at http://ibatis.apache.org/docs/java/pdf/iBATIS-SqlMaps-2_en.pdf. If you have questions after you read it. Please feel free to post here and ask. Thanks, Brandon Goodin On 9/21/07, Yuvraj Shinde wrote: > > How to use a selectKey In insert ? > > -----Original Message----- > From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On Behalf > Of Larry Meadors > Sent: Friday, September 21, 2007 9:36 PM > To: user-java@ibatis.apache.org > Subject: Re: insert always returning null (urgent ) > > The insert method does not return the inserted object, it returns the > result of your selectKey element. > > If you don't use a selectKey element, insert will return null. > > Larry > > > On 9/21/07, Yuvraj Shinde wrote: > > > > > > > > > > Hi all > > > > > > > > I am using insert query. it is always returning a null value. how to > get > > the value of inserted object? > > > > > > > > Following is mine insert statement > > > > > > > > > > parameterClass="com.sungard.energy.zainet.shared.business.domain.Limname > DTO" > > > > > > > insert into LIMNAME (AUDIT_ACTIVE, AUDIT_AGEN, AUDIT_AOP0, > AUDIT_ADATE0, > > AUDIT_ATIME0, > > > > AUDIT_AOP1, AUDIT_ADATE1, AUDIT_ATIME1, AUDIT_ALF, AUDIT_AOHM, > > AUDIT_ROHM, AUDIT_REFRESH, > > > > AUDIT_ZKEY, AUDIT_XKEY, AUDIT_UTIL1, AUDIT_UTIL2, LIMNAME_NAME, > > LIMNAME_DSC, LIMNAME_FILTER, > > > > LIMNAME_FILTERA, LIMNAME_FILTERB, LIMNAME_FILTERC, > LIMNAME_RUNVIEW) > > > > values (#active:DECIMAL#, #agen:DECIMAL#, #aop0:CHAR#, > > #adate0:TIMESTAMP#, > > > > #atime0:DECIMAL#, #aop1:CHAR#, #adate1:TIMESTAMP#, > #atime1:DECIMAL#, > > > > #alf:TIMESTAMP#, #aohm:TIMESTAMP#, #rohm:TIMESTAMP#, > > #refresh:DECIMAL#, > > > > #zkey:DECIMAL#, #xkey:DECIMAL#, #util1:DECIMAL#, > #util2:DECIMAL#, > > > > #limnameName:VARCHAR#, #limnameDsc:VARCHAR#, > #limnameFilter:VARCHAR#, > > > > #limnameFiltera:VARCHAR#, #limnameFilterb:VARCHAR#, > > #limnameFilterc:VARCHAR#, > > > > #limnameRunview:CHAR#) > > > > > > > > > > > > > > Regards > > > > Yuvraj > > > > Yuvraj Shinde * Senior Software Engineer - Zainet* SunGard * > Offshore > > Services * Pride Portal,CTS No 103A/5A/1A/1B Bhamburda,Senapati Bapat > Road, > > shivajinagar,Pune 411016 Tel Direct +91 20 66248045 * Main +91 20 > 66248000 * > > Fax +91 20 25606222 yuvraj.shinde@sos.sungard.com * www.sungard.com > > > > > > > > > > > ------=_Part_36013_5905942.1190396714070 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Yuvraj,

I'd be happy to train you one on one on how to use iBATIS. Feel free to contact me and i can provide you my billable rate. However, your best bet is to read the manual first. It is located at  http://ibatis.apache.org/docs/java/pdf/iBATIS-SqlMaps-2_en.pdf. If you have questions after you read it. Please feel free to post here and ask.

Thanks,
Brandon Goodin

On 9/21/07, Yuvraj Shinde <Yuvraj.Shinde@sos.sungard.com> wrote:
How to use a selectKey In insert ?

-----Original Message-----
From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com ] On Behalf
Of Larry Meadors
Sent: Friday, September 21, 2007 9:36 PM
To: user-java@ibatis.apache.org
Subject: Re: insert always returning null (urgent )

The insert method does not return the inserted object, it returns the
result of your selectKey element.

If you don't use a selectKey element, insert will return null.

Larry


On 9/21/07, Yuvraj Shinde < Yuvraj.Shinde@sos.sungard.com> wrote:
>
>
>
>
> Hi all
>
>
>
>  I am using insert query. it is always returning a null value. how to
get
> the value of inserted object?
>
>
>
>  Following is mine insert statement
>
>
>
>   <insert id="LIMNAME_INSERT"
>
parameterClass=" com.sungard.energy.zainet.shared.business.domain.Limname
DTO"
> >
>
>     insert into LIMNAME (AUDIT_ACTIVE, AUDIT_AGEN, AUDIT_AOP0,
AUDIT_ADATE0,
> AUDIT_ATIME0,
>
>       AUDIT_AOP1, AUDIT_ADATE1, AUDIT_ATIME1, AUDIT_ALF, AUDIT_AOHM,
> AUDIT_ROHM, AUDIT_REFRESH,
>
>       AUDIT_ZKEY, AUDIT_XKEY, AUDIT_UTIL1, AUDIT_UTIL2, LIMNAME_NAME,
> LIMNAME_DSC, LIMNAME_FILTER,
>
>       LIMNAME_FILTERA, LIMNAME_FILTERB, LIMNAME_FILTERC,
LIMNAME_RUNVIEW)
>
>     values (#active:DECIMAL#, #agen:DECIMAL#, #aop0:CHAR#,
> #adate0:TIMESTAMP#,
>
>       #atime0:DECIMAL#, #aop1:CHAR#, #adate1:TIMESTAMP#,
#atime1:DECIMAL#,
>
>       #alf:TIMESTAMP#, #aohm:TIMESTAMP#, #rohm:TIMESTAMP#,
> #refresh:DECIMAL#,
>
>       #zkey:DECIMAL#, #xkey:DECIMAL#, #util1:DECIMAL#,
#util2:DECIMAL#,
>
>       #limnameName:VARCHAR#, #limnameDsc:VARCHAR#,
#limnameFilter:VARCHAR#,
>
>       #limnameFiltera:VARCHAR#, #limnameFilterb:VARCHAR#,
> #limnameFilterc:VARCHAR#,
>
>       #limnameRunview:CHAR#)
>
>   </insert>
>
>
>
>
>  Regards
>
>  Yuvraj
>
> Yuvraj Shinde * Senior Software Engineer -  Zainet*  SunGard *
Offshore
> Services * Pride Portal,CTS No 103A/5A/1A/1B Bhamburda,Senapati Bapat
Road,
> shivajinagar,Pune 411016 Tel Direct +91 20 66248045 * Main +91 20
66248000 *
> Fax +91 20  25606222 yuvraj.shinde@sos.sungard.com * www.sungard.com
>
>
>
>



------=_Part_36013_5905942.1190396714070--