相关疑难解决方法(0)

从C#和ODP.NET调用包中的函数的代码

我试图用ODP.NET编写C#代码来调用包中的函数.我收到以下两个错误:

ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to INSERT_FUNC'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

ORA-06550: line 1, column 7:
PLS-00221: 'INSERT_FUNC' is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Run Code Online (Sandbox Code Playgroud)

OracleCommand的设置如下:

cmd.CommandText = "PKG_NAME.INSERT_FUNC";
cmd.CommandType = CommandType.StoredProcedure;
Run Code Online (Sandbox Code Playgroud)
  1. 我应该如何将参数传递给下面的函数?
  2. 我需要添加ReturnValue参数吗?我见过很多论坛讨论了在对象上添加ReturnValue参数的必要性.OracleParameterOracleCommand

我将不胜感激任何建议.

CREATE OR REPLACE
PACKAGE BODY pkg_name IS
  FUNCTION insert_func (
      i_description IN  tableName.description%TYPE,
      i_theme       IN …
Run Code Online (Sandbox Code Playgroud)

c# oracle odp.net

12
推荐指数
1
解决办法
3万
查看次数

标签 统计

c# ×1

odp.net ×1

oracle ×1