如何使用SQuirreL SQL中的OUT参数调用DB2存储过程? [英] How can I call a DB2 stored procedure with OUT parameters from SQuirreL SQL?

查看:413
本文介绍了如何使用SQuirreL SQL中的OUT参数调用DB2存储过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我非常喜欢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( http://www.sql-workbench.net/ )我可以调用一个程序:

Using the open source "SQL Workbench/J" (http://www.sql-workbench.net/) 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存储过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆