Hi, Clinton

I reported the same problem totje Spring team.
The following  is Comment by Juergen Hoeller [28/Sep/05 12:43 PM]

>This does not look like an issue with Spring but rather with iBATIS SQL
>Maps itself. Please report it to >the iBATIS team!

>Juergen

BTW,  I debuged the following code,
and indeed  it returns 0.

Regards

----- Original Message -----
From: "Clinton Begin (JIRA)" <[email protected]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 03, 2005 11:45 AM
Subject: [jira] Commented: (IBATIS-200) The method executor.executeBatch()
always returns 0.


>    [
> http://issues.apache.org/jira/browse/IBATIS-200?page=comments#action_12331121 ]
>
> Clinton Begin commented on IBATIS-200:
> --------------------------------------
>
> Can you test it quickly without Spring....as far as I can tell, there' s
> no reason it shouldn't return the total number of rows updated...
>
> Clinton
>
>> The method executor.executeBatch() always returns 0.
>> ----------------------------------------------------
>>
>>          Key: IBATIS-200
>>          URL: http://issues.apache.org/jira/browse/IBATIS-200
>>      Project: iBatis for Java
>>         Type: Bug
>>   Components: SQL Maps
>>     Versions: 2.1.0
>>  Environment: SUN JVM 1.4.2 On Windows
>>     Reporter: daikei mou
>
>>
>> I am using Sql Maps 2.1.5 with Spring 1.2.4.
>> I have a method as following.
>> I want to get the number of rows updated in the batch .
>> But it always returns 0.
>> public int insertBatchError(final List batchErrorList) {
>>         Integer count = (Integer) getSqlMapClientTemplate().execute(new
>> SqlMapClientCallback() {
>>             public Object doInSqlMapClient(SqlMapExecutor executor)
>> throws SQLException {
>>              executor.startBatch();
>>                 for (int i = 0; i < batchErrorList.size(); i++) {
>>                  BatchErrorDTO batchErrorDto = (BatchErrorDTO)
>> batchErrorList.get(i);
>>                     executor.update("insertBatchError", batchErrorDto);
>>                 }
>>                 int count = executor.executeBatch();
>>                 return new Integer(count);
>>             }
>>         });
>>
>>         return count.intValue();
>> }
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>   http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>   http://www.atlassian.com/software/jira
>

Reply via email to