我真的很喜欢将 SQuirreL SQL 作为 SQL 查询工具,但是我从来没有能够让它调用我们的 AS/400 DB2 数据库中的存储过程.我总是收到错误设置或注册的参数值的数量与参数的数量不匹配".我已经仔细检查了参数的数量并且没有运气.这是我为一个需要一个 IN 和一个 OUT 的过程尝试过的语法:
I really like SQuirreL SQL as a SQL query tool, but I've never been able to get it to call stored procedures in our AS/400 DB2 database. I always get the error "The number of parameter values set or registered does not match the number of parameters." I've double-checked the number of params and had no luck. This is the syntax I've tried for a procedure that takes one IN and one OUT:
调用 SOMESPROC(12345, ?);
call SOMESPROC(12345, ?);
推荐答案目前 SQuirrel 似乎无法在 AS/400 DB2 上做到这一点.
It seems that SQuirrel currently is not capable of doing that on AS/400 DB2.
使用开源SQL Workbench/J"(www.sql-workbench/) 我能够调用一个过程:
Using the open source "SQL Workbench/J" (www.sql-workbench/) I was able to call a procedure:
wbcall SOMESPROC(12345, ?);它有自己的命令来调用过程wbcall".利用 ?输出参数.
It has its own command for calling a procedure "wbcall". Use ? for out parameters.
注意:安装 SQL Workbench/J 时,请确保从 IBM 并在 SQL Workbench/J 中添加驱动程序时添加许可证文件.
Note: While installing SQL Workbench/J make sure to download the right DB2 driver from IBM and also add the licence file while adding the driver inside SQL Workbench/J.
更多推荐
如何从 SQuirreL SQL 调用带有 OUT 参数的 DB2 存储过程?
发布评论