Re: AW: AW: String parameter problem

2009-07-09 Thread Cax
I use Oracle database. Sergey Livanov-2 wrote: > > What database do you use ? > > 2009/7/9 Cax > >> >> i try to change the sql not to get the parameter, like this : >> >> select >> PX_IR025_PAN as pan, >> F9_IR025_CRN as CRN, >> FX_IR025_EMB_NAME as name, >> FX_IR025_CRD_

Consulting...Connection is invalid (still)

2009-07-09 Thread Eric Floehr
Clinton, If you remember, I contacted you in early 2008 regarding some “Connection is invalid” issues we were seeing. First you recommended making sure in all transactions we were using the correct try/except/finally pattern, which we did. Then using the latest version which removed object

Re: select multiple fields query

2009-07-09 Thread Kambix
Hello Larry, in the above example; can I get only the second column back with resultClass="String" without resultmap? I mean how can I map it? I have a group by query with more than one column, but only one of them is to be mapped (the first one in this case). How can I do it whithout defining

Re: AW: AW: String parameter problem

2009-07-09 Thread Sergey Livanov
What database do you use ? 2009/7/9 Cax > > i try to change the sql not to get the parameter, like this : > > select > PX_IR025_PAN as pan, > F9_IR025_CRN as CRN, > FX_IR025_EMB_NAME as name, > FX_IR025_CRD_PGM as crdPgm, > FX_IR025_UPD_UID as updId >from IR025 >

Re: AW: AW: String parameter problem

2009-07-09 Thread Cax
i try to change the sql not to get the parameter, like this : select PX_IR025_PAN as pan, F9_IR025_CRN as CRN, FX_IR025_EMB_NAME as name, FX_IR025_CRD_PGM as crdPgm, FX_IR025_UPD_UID as updId from IR025 where PX_IR025_PAN = '1234567890123456' and it works..

Re: Retrieve inserted id in mass insert using SqlMapExecutor.

2009-07-09 Thread Jeff Butler
As you've seen, is really not compatible with batch execution. Batches are for executing the same statement over and over again. interferes with that. So instead of insert insert insert insert You have insert select insert select insert select insert select iBATIS makes a transaction bounda

Re: AW: AW: String parameter problem

2009-07-09 Thread Andrey Rogov
hi Cax, iBatis doesn't resolve sql problems, it is sql mapper. try to solve this problem with external sql runner, then copy sql to xml files. 2009/7/9 Cax > > Hi Benjamin,i'd tried this way before also...but it still hit the same > problem... :( > > > > Benjamin-Klatt wrote: > > > > No there s

Re: AW: AW: String parameter problem

2009-07-09 Thread Cax
Hi Benjamin,i'd tried this way before also...but it still hit the same problem... :( Benjamin-Klatt wrote: > > No there should not be any limitation that you will have to worry about. > What data type do you use in the database for the PX_IR025_PAN field? > > Can you try to explicitly define

RE: Retrieve inserted id in mass insert using SqlMapExecutor.

2009-07-09 Thread Westhveg
Yes, I know. I specify the 'keyProperty' in 'selectKey' and it works well for single execution. The problem is when I use the Batch process, then, it returns 0 and record doesn't be updated. meindert-3 wrote: > > I was saying the id (keyProperty) on your records... > As far as I know the id pro

RE: Retrieve inserted id in mass insert using SqlMapExecutor.

2009-07-09 Thread meindert
I was saying the id (keyProperty) on your records... As far as I know the id property is updated by ibatis (when you tell it what the key property is) Eg; The uploadLogId property of the record you provided as insert parameter should have been updated to the generated primary key So you can loop

RE: Retrieve inserted id in mass insert using SqlMapExecutor.

2009-07-09 Thread Westhveg
No, I'm not able. There are two ways to execute batch process, 'executeBatch()' and 'executeBatchDetailed()'. The first return an Integer with the total number of affected rows. The second returns a List of 'BatchResult', where it have one BatchResult for each iBatis batched operation (in my case

RE: Retrieve inserted id in mass insert using SqlMapExecutor.

2009-07-09 Thread meindert
Ok, don't know for sure, but wouldn't you be able to loop through the list after the batch has executed and check the id (keyProperty) on your records? -Original Message- From: Westhveg [mailto:westhstud...@gmail.com] Sent: 09 July 2009 11:47 AM To: user-java@ibatis.apache.org Subject:

RE: Retrieve inserted id in mass insert using SqlMapExecutor.

2009-07-09 Thread Westhveg
Hello meindert-3, Thanks for your reply. This is correct and in my case is already working. But my problem is when I use batch processes. Remembering the code: public List createRecordsMassively(final List records) { getSqlMapClientTemplate().execute(new SqlMapClientCallback() {

RE: Retrieve inserted id in mass insert using SqlMapExecutor.

2009-07-09 Thread meindert
Put the name of the property that hold the ID in the sql map and the record get's updated with the id and your insert statement returns the id object Here is MS SQl example, just replace SELECT @@IDENTITY with the correct query for Mysql to fetch the ID insert into online_upload_log (id

Retrieve inserted id in mass insert using SqlMapExecutor.

2009-07-09 Thread Westhveg
Hello, My environtment is: Java 1.6 iBatis 2.3.4 Spring 2.5.6 MySQL I've a method to create records massively (I write directly, it can has sintax errors; just take the idea): public List createRecordsMassively(final List records) { getSqlMapClientTemplate().execute(new SqlMapClientC