PLS-00306 参数个数或类型错误 (在线等待,立刻给分)

infowain 2003-01-18 07:26:29
用delphi6开发,使用ado连接,用oledb for oracle
调用存储过程的时候出现上面的问题
...全文
310 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
infowain 2003-01-24
  • 打赏
  • 举报
回复
代码没有问题,是ORACLE9.0版本和OLEDB配合上有问题,给大家老外的意见吧。
但是有没有人知道哪里有补丁呢??



Hi, I have a problem with 9i... does not exist in 8i. I wonder if it is a bug, or if I am interpreting these results somehow incorrectly.

Summary: data dictionary tables seem inconsistent, which causes the Oracle OLEDB/ADO driver to fail when doing a Command.Parameters.Refresh() when the Command object is pointed to a stored procedure.

I will explain from the ground-up (reverse order as discovered in troubleshooting).

Suppose I have a procedure defined in my schema named 'PROC'. There is no
package, just a procedure.

ON 8.1.6:
SQL> select o.name, a.procedure$ from
2 argument$ a, obj$ o
3 where o.obj# = a.obj# and
4 o.name = 'PROC' ;

NAME PROCEDURE$
------------------------------ ------------------------------ PROC

<<notice the blank in PROCEDURE$ >>

ON 9.0.1:
SQL> select o.name, a.procedure$ from
2 argument$ a, obj$ o
3 where o.obj# = a.obj# and
4 o.name = 'PROC' ;

NAME PROCEDURE$
------------------------------ ------------------------------
PROC PROC

<<exact same query, exact same schema, different results>>

Now, this would be purely academic, except for the ALL_ARGUMENTS view, which is defined the same in 8i and 9i. The relevant code in this view is...


VIEW ALL_ARGUMENTS:
select
<<snip>>
nvl(a.procedure$,o.name), /* OBJECT_NAME */ decode(a.procedure$,null,null, o.name), /* PACKAGE_NAME */ <<snip>> from obj$ o,argument$ a,user$ u where o.obj# = a.obj# <<snip>>

Now, reading between the lines here one can infer that in the ALL_ARGUMENTS view, my procedure PROC appears to be:
8i: PACKAGE_NAME: null, OBJECT_NAME: PROC
9i: PACKAGE_NAME: PROC, OBJECT_NAME: PROC

where the 9i view is clearly erroneous. It is causing the ADO driver to
break since that uses ALL_ARGUMENTS.

Is this a known 9i bug, or a problem with my thinking :)

Thanks,
JT.
beckhambobo 2003-01-19
  • 打赏
  • 举报
回复
可以把代码贴出来吧
penitent 2003-01-19
  • 打赏
  • 举报
回复
提示很明显了,检查每个参数是否正确
不要给数字赋予字符型的参数
sdz97 2003-01-18
  • 打赏
  • 举报
回复
ORA-00306 limit of string instances in this database
Cause: Starting this instance would exceed the maximum number of instances allowed for this
database. This message occurs only with STARTUP shared and multiple instances.
Action: You cannot start more than the lower of:
the operating system-specific maximum or
the number of instances specified by the MAXINSTANCES option specified in the CREATE
DATABASE statement
nicholaz 2003-01-18
  • 打赏
  • 举报
回复
那你就看看对表操作时对字段的类型和数量有没有设对!

3,491

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 高级技术相关讨论专区
社区管理员
  • 高级技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧