ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bing Qiao <qiaob...@gmail.com>
Subject INSERT disrupts Resultset from Stored Procedure?
Date Tue, 28 Jun 2005 16:53:59 GMT
Dear all,

Another stored procedure issue.

I can't have the following INSERT INTO statement in my stored
procedure. Otherwise, the queryForList won't work (throwing
exception).

Does this insert incur any resultset as well?

Many thanks,

Bing

///////////////////////////////////////
Stored Procedure:

DECLARE @ACT TABLE (PAYMENTID INT, ACT BIT)

INSERT INTO @ACT  (PAYMENTID, ACT) values (1,1)

SELECT top 30000 
1 AS PAYMENTID, 
'L' AS FIRMID, 
.....
.....
//////////////////////////////////////////
Call from java:

list = (List) sqlmap.queryForList("TPayment-search", tpayment);
/////////////////////////////////////////
Exception:

com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in treasury/ibatis/T_PAYMENT.xml.
--- The error occurred while applying a parameter map.
--- Check the T_PAYMENT.TPaymentParam.
--- Check the results (failed to retrieve results).
--- Cause: java.lang.NullPointerException
Caused by: java.lang.NullPointerException
        at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWit
/////////////////////////////////////////

Mime
View raw message