下面两种发放,都出现了错误。
存储过程在Management Studio中是可以正确执行的。
/*
//
//String bakSQL = "exec up_clear_db() ";//
//Sql sql=Sqls.create(bakSQL);
*/
//
String bakSQL = "call up_clear_db() ";
Sql sql=Sqls.fetchEntity(bakSQL);
DBFactory.getDao().execute(sql);
错误为
Caused by: org.nutz.dao.DaoException: !Nutz SQL Error: 'call up_clear_db()'
PreparedStatement:
'call up_clear_db()'
at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:95)
at org.nutz.dao.impl.DaoSupport$DaoExec.invoke(DaoSupport.java:250)
at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:64)
... 32 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ')'.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1493)