【发布时间】:2020-02-27 17:54:23
【问题描述】:
我正在尝试从包 APP Oracle10g 中调用存储过程“getGlobalParamValue”
org.springframework.boot 版本'2.2.0.RELEASE'
FUNCTION getGlobalParamValue(
pCode VARCHAR2
RETURN INTEGER;
当我在 SQL 开发人员中运行它时,一切正常,我得到了正确的结果
我试过了
1.
jdbcTemplate.update("BEGIN APP.getGlobalParamValue('base'); END;");
或 2.
val sjc = new SimpleJdbcCall(jdbcTemplate)
.withCatalogName("APP")
.withProcedureName("getGlobalParamValue");
sjc.useInParameterNames("pCode")
.withoutProcedureColumnMetaDataAccess()
.declareParameters(new SqlOutParameter("p_out", OracleTypes.INTEGER),
new SqlParameter("pCode", OracleTypes.VARCHAR));
SqlParameterSource in = new MapSqlParameterSource()
.addValue("pCode", "base");
sjc.execute(in);
没用
我收到一个错误:
Caused by: org.springframework.jdbc.BadSqlGrammarException:CallableStatementCallback; bad SQL grammar
nested exception is java.sql.SQLException: ORA-06550`
【问题讨论】: