2011-11-10 27 views
0

聲明局部變量數/整數ibatis的

DECLARE 

CommitCmpt int; HERE the variable to use it later 

BEGIN 

INSERT INTO test.... 

Commitcmpt := CommitCmpt + 1 ; 

END; 

我在這條線得到一個錯誤:

CommitCmpt int; 

com.ibatis.common.jdbc.exception.NestedSQLException: 
--- Cause: com.microsoft.sqlserver.jdbc.SQLServerException: 'int' is not a recognized CURSOR option. 

任何幫助嗎?

我使用iBATIS將記錄插入到一​​個SQL Server 2008中的表

回答

0

Local variable名稱應與@符號開頭,否則會認爲這是一個cursor

+0

好的,謝謝戴夫,我會試試看。您是否有其他解決方案來限制ibatis針對特定數量的記錄提交? – Joe123