nPLS-00306: wrong number or types of arguments in call

Ahsen

Excuse me if question is being repeated. I have two projects in my solution, a console application and a MVC4 website. I'm using Oracle managed drviers for accessing oracle database 11g. I'm trying to retrieve data from following stored procedure:

create or replace procedure "GETEMPIDS"
    (
       p_cursor OUT SYS_REFCURSOR
    )
is
begin
    OPEN p_cursor FOR
select *
    from EMP;
end;​

After making entities and other stuff in my console application, I get data by doing:

 public List<GETEMPIDS_Result> GetAllEmployees()
        {
            Entities db = new Entities();
            List<GETEMPIDS_Result> result = db.GETEMPIDS().ToList<GETEMPIDS_Result>();
            return result;
        }

I have added reference of this console application in my website but when I call above method in my controller it gives exception:

"ORA-06550: line 1, column 8:\nPLS-00306: wrong number or types of arguments in call to 'GETEMPIDS'\nORA-06550: line 1, column 8:\nPL/SQL: Statement ignored"}

at following line in context class

public virtual System.Data.Entity.Core.Objects.ObjectResult<GETEMPIDS_Result> GETEMPIDS()
        {
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GETEMPIDS_Result>("GETEMPIDS");
        }

Is there anything I'm missing?

Ahsen

When we add a result of Stored Procedure in entities, it adds some code relating to output fields in config file.

 <implicitRefCursor>
    <storedProcedure schema="AHSEN" name="GETEMPIDS">
      <refCursor name="P_CURSOR">
        <bindInfo mode="Output" />
        <metadata columnOrdinal="0" columnName="EMPNO" providerType="Int16" allowDBNull="false" nativeDataType="Number" />
        <metadata columnOrdinal="1" columnName="ENAME" providerType="Varchar2" allowDBNull="true" nativeDataType="Varchar2" />
        <metadata columnOrdinal="2" columnName="JOB" providerType="Varchar2" allowDBNull="true" nativeDataType="Varchar2" />
        <metadata columnOrdinal="3" columnName="MGR" providerType="Int16" allowDBNull="true" nativeDataType="Number" />
        <metadata columnOrdinal="4" columnName="HIREDATE" providerType="Date" allowDBNull="true" nativeDataType="Date" />
        <metadata columnOrdinal="5" columnName="SAL" providerType="Single" allowDBNull="true" nativeDataType="Number" />
        <metadata columnOrdinal="6" columnName="COMM" providerType="Single" allowDBNull="true" nativeDataType="Number" />
        <metadata columnOrdinal="7" columnName="DEPTNO" providerType="Int16" allowDBNull="true" nativeDataType="Number" />
      </refCursor>
    </storedProcedure>
  </implicitRefCursor>

My problem was solved when I copied that code and pasted it in config file of my website.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

COUNTIF phpexcel Wrong number of arguments

From Dev

PL/SQL: Error "PLS-00306: wrong number or types of arguments in call to" triggered for table of numbers

From Dev

Getting wrong number or types of arguments in call to exception while executing stored procedure

From Dev

wrong number of arguments for carrierwave for actionDispatch

From Dev

ArgumentError: wrong number of arguments in Ruby

From Dev

PLS-00306: wrong number or types of arguments in call to 'OUTPUT_ARRAY'

From Dev

Boost: wrong number of template arguments

From Dev

No luck getting most recent entry in sub-select: ORA-00904: invalid identifier, and ORA-06553: wrong number or types of arguments in call

From Dev

passing PHP array to Oracle Stored Proc (PLS-00306: wrong number or types of arguments)

From Dev

Oracle procedure call results in "PLS-00306: wrong number or types of arguments in call"

From Dev

wrong number of template arguments

From Dev

Wrong number of arguments issue

From Dev

Wrong number of arguments error in response

From Dev

Ruby Mailer: Wrong number of arguments

From Dev

Wrong number of Arguments with Lombok

From Dev

Wrong number of arguments for pattern

From Dev

Call Oracle Stored Procedure with Char Out Parameter errors with PLS-00306: wrong number or types of arguments in call

From Dev

PLS-00306: wrong number or types of arguments in call to 'CREATE_PROGRAM'

From Dev

Wrong number or types of arguments error while calling procedure

From Dev

No luck getting most recent entry in sub-select: ORA-00904: invalid identifier, and ORA-06553: wrong number or types of arguments in call

From Dev

Wrong number or types of arguments in call to even after correct parameters

From Dev

Mismatch in Number/Types of Arguments

From Dev

Oracle Stored Procedure PLS-00306: wrong number or types of arguments

From Dev

PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'

From Dev

ArgumentError: wrong number of arguments

From Dev

Wrong number of arguments on initialize

From Dev

Oracle Procedure - PLS-00306: wrong number or types of arguments

From Dev

"Wrong number or types of argument in call to '>'" when comparing dates in PLSQL

From Dev

Wrong number or TYPES of arguments, error in PL/SQL

Related Related

  1. 1

    COUNTIF phpexcel Wrong number of arguments

  2. 2

    PL/SQL: Error "PLS-00306: wrong number or types of arguments in call to" triggered for table of numbers

  3. 3

    Getting wrong number or types of arguments in call to exception while executing stored procedure

  4. 4

    wrong number of arguments for carrierwave for actionDispatch

  5. 5

    ArgumentError: wrong number of arguments in Ruby

  6. 6

    PLS-00306: wrong number or types of arguments in call to 'OUTPUT_ARRAY'

  7. 7

    Boost: wrong number of template arguments

  8. 8

    No luck getting most recent entry in sub-select: ORA-00904: invalid identifier, and ORA-06553: wrong number or types of arguments in call

  9. 9

    passing PHP array to Oracle Stored Proc (PLS-00306: wrong number or types of arguments)

  10. 10

    Oracle procedure call results in "PLS-00306: wrong number or types of arguments in call"

  11. 11

    wrong number of template arguments

  12. 12

    Wrong number of arguments issue

  13. 13

    Wrong number of arguments error in response

  14. 14

    Ruby Mailer: Wrong number of arguments

  15. 15

    Wrong number of Arguments with Lombok

  16. 16

    Wrong number of arguments for pattern

  17. 17

    Call Oracle Stored Procedure with Char Out Parameter errors with PLS-00306: wrong number or types of arguments in call

  18. 18

    PLS-00306: wrong number or types of arguments in call to 'CREATE_PROGRAM'

  19. 19

    Wrong number or types of arguments error while calling procedure

  20. 20

    No luck getting most recent entry in sub-select: ORA-00904: invalid identifier, and ORA-06553: wrong number or types of arguments in call

  21. 21

    Wrong number or types of arguments in call to even after correct parameters

  22. 22

    Mismatch in Number/Types of Arguments

  23. 23

    Oracle Stored Procedure PLS-00306: wrong number or types of arguments

  24. 24

    PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'

  25. 25

    ArgumentError: wrong number of arguments

  26. 26

    Wrong number of arguments on initialize

  27. 27

    Oracle Procedure - PLS-00306: wrong number or types of arguments

  28. 28

    "Wrong number or types of argument in call to '>'" when comparing dates in PLSQL

  29. 29

    Wrong number or TYPES of arguments, error in PL/SQL

HotTag

Archive