将字符串数组从 Pro*C 传递到 PL/SQL
我的包中有一个过程
create or replace package MyPack
type MyArr is table of varchar2(30) index by pls_integer;
prodecure MyProc(p in MyArr);
end MyPack;
,我想从 Pro*C 调用它。所以我(所有其余的函数都被遗漏了)
char my_arr[50][30] = {0};
EXEC SQL EXECUTE
BEGIN
MyPack.MyProc(:my_arr);
END;
END-EXEC;
当我尝试编译这个时,我收到错误
“PLS-S-00418,数组绑定类型必须与 PL/SQL 表行类型匹配”
关于我做错了什么的任何想法?
I have a procedure in a package
create or replace package MyPack
type MyArr is table of varchar2(30) index by pls_integer;
prodecure MyProc(p in MyArr);
end MyPack;
and I want to call it from Pro*C. So I have (all the rest of the function left out)
char my_arr[50][30] = {0};
EXEC SQL EXECUTE
BEGIN
MyPack.MyProc(:my_arr);
END;
END-EXEC;
When I try to compile this I get the error
"PLS-S-00418, array bind type must match PL/SQL table row type"
Any ideas on what I am doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请参见示例程序9:调用存储过程
我认为这符合你的描述。
see Sample Program 9: Calling a stored procedure
I think this fits your description.
我有类似的问题。我试图将 C++ 数组传递
给存储过程。解决方案是将过程参数声明为
I had a similar problem. I was trying to pass an c++ array,
to a stored procedure. The solution was to declare the procedure parameter as