在ibatis中将局部变量声明为数字/整数

时间:2011-11-10 10:47:35

标签: java sql sql-server-2008 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表中

1 个答案:

答案 0 :(得分:0)

Local variable名称应以@符号开头,否则会认为它是cursor