如何从 SQuirreL SQL 调用带有 OUT 参数的 DB2 存储过程?

编程入门 行业动态 更新时间:2024-10-26 17:27:48
本文介绍了如何从 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"(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 存储过程?

本文发布于:2023-07-21 11:05:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1176891.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:存储过程   参数   SQuirreL   SQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!