Call Oracle package function using Odbc from C#

前端 未结 4 1507
隐瞒了意图╮
隐瞒了意图╮ 2021-01-24 16:47

I have a function defined inside an Oracle package:

CREATE OR REPLACE PACKAGE BODY TESTUSER.TESTPKG as
  FUNCTION testfunc(n IN NUMBER) RETURN NUMBER as
  begin
         


        
4条回答
  •  面向向阳花
    2021-01-24 17:24

    I managed to call the package function like this:

    command.CommandText = @"begin
        :ret := ILMTEST.testpkg.testfunc(:n);
    end;";
    command.CommandType = System.Data.CommandType.Text;
    

提交回复
热议问题