尝试使用存储过程从 SQL 服务器获取数据在 JMP14 中失败,但在 JMP8 和 JMP9 中成功。
在 JMP14 中有一个错误:
JMP 警报:无法获取结果集。
JMP AlertJMP AlertJMP警报
并且没有结果表 (show(t1); return "t1=.)
我在 JSL 和“Databse Open Table”中遇到了同样的问题
存储过程输出包含几个需要跳过的空集。 显然 JMP8 是自动执行的,但不是 JMP14。
SQL outputSQL output输出
使用 Python 我通过 cursor.nextset() 克服了这个问题,直到我得到一个带有值的集合。
我尝试了多种格式,包括:
dbc = Create Database Connection(
"DSN=*******;UID=*****;PWD=*********;APP=JMP;WSID=SYS-CB2;DATABASE=Iserve;LANGUAGE=us_english;"
);
t1 = Execute SQL( dbc, "exec PL_RawData_restart '50110326','08/01/2018','08/16/2018' " );
RawData_dt=Open Database("DSN=*******;UID=****;PWD=*****;APP=JMP;WSID=SYS-CB2;DATABASE=Iserve;LANGUAGE=us_english", "exec PL_RawData_restart '48300134', '2018-07-17', '2018-07-31'");
我没有使用存储过程,但这里有一个指向 JMP 13 的 JMP 博客 2017 年 3 月的链接
https://community.jmp.com/t5/Discussions/Database-stored-procedure/td-p/36885
另一个关于 JMP 11 的 NO COUNT ON
https://community.jmp.com/t5/Discussions/JMP11-MSSQL-Stored-Procedure-Call/td-p/10906
关于为什么存储过程在 JMP 8 中有效而不在 JMP 11 中有效的注释
https://community.jmp.com/t5/Discussions/Importing-SQL-using-a-temp-table/td-p/11760
希望这些能给你一些线索。