java项目,sp_cursoropen/sp_cursorprepare: 语句参数只能是单个 SELECT 语句或单个存储过程。
sqlserver2000数据库,sqljdbc包,用hibernate一对多批量添加时报这个错,严重:警告:SQLError:16938,SQLState:S00012...
sqlserver2000数据库,sqljdbc包,用hibernate一对多批量添加时报这个错,严重:
警告: SQL Error: 16938, SQLState: S0001
2012-12-26 8:39:20 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: com.microsoft.sqlserver.jdbc.SQLServerException: sp_cursoropen/sp_cursorprepare: 语句参数只能是单个 SELECT 语句或单个存储过程。
2012-12-26 8:39:20 org.hibernate.event.def.AbstractFlushingEventListener performExecutions
严重: Could not synchronize database state with session
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: Method public java.lang.String org.hibernate.exception.NestableRuntimeException.getMessage(int) threw an exception when invoked on org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
012-12-26 8:39:20 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet default threw exception
java.lang.IllegalStateException
at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:407) 展开
警告: SQL Error: 16938, SQLState: S0001
2012-12-26 8:39:20 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: com.microsoft.sqlserver.jdbc.SQLServerException: sp_cursoropen/sp_cursorprepare: 语句参数只能是单个 SELECT 语句或单个存储过程。
2012-12-26 8:39:20 org.hibernate.event.def.AbstractFlushingEventListener performExecutions
严重: Could not synchronize database state with session
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: Method public java.lang.String org.hibernate.exception.NestableRuntimeException.getMessage(int) threw an exception when invoked on org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
012-12-26 8:39:20 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet default threw exception
java.lang.IllegalStateException
at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:407) 展开
5个回答
展开全部
由系统管理员管理,所有系统存储过程的名字均以sp_开始如果过程以sp_前缀命名的过程在当前数据库中找而在视图中只能是 select 语句()视图不能接受参数,只能返回结果集;而存储过程可以接受参数,包括输入,输出参数
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
2000或2005的驱动 ? 升级驱动、或换jtds驱动试试
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询