Problems with Oracle Stored Procedures


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Problems with Oracle Stored Procedures

  1. #1
    Join Date
    Dec 2003
    Location
    Italy
    Posts
    250

    Problems with Oracle Stored Procedures

    Hello guys,
    I have this stored procedure on an Oracle 10.1 database:

    CREATE OR REPLACE PROCEDURE "SG"."REPGEN_EXP" (
    p_recordset1 OUT SYS_REFCURSOR, codexp IN varchar2)
    as
    begin
    OPEN p_recordset1 FOR
    SELECT *
    FROM EXP
    where
    COD_EXP = codexp;
    end;

    And it's working correctly
    The problem is that I need to use another parameter (or variable, as you prefer), so after modifying the stored procedure, when I call it from my application (C# .Net 2005), I'm getting an error message (showed below)

    NEW STORED PROCEDURE:

    CREATE OR REPLACE PROCEDURE "SG"."REPGEN_EXP" (
    p_recordset1 OUT SYS_REFCURSOR, codexp IN varchar2, model IN varchar2)
    as
    begin
    OPEN p_recordset1 FOR
    SELECT *
    FROM EXP
    where
    COD_EXP = codexp
    AND MOD = model;
    end;

    ERROR MESSAGE:

    ORA-06550: line 1, column 7:
    PLS-00306: PLS-00306: wrong number or types of arguments in call to 'REPGEN_EXP'

    I only need to create a dataset from the resulting data of and Oracle Stored procedure, that's all I need.

    Does anybody know why is this happening and how can I solve it ?

    Thank you all

  2. #2
    Join Date
    Jul 2007
    Posts
    4
    How u r calling the procedure, initially u may called with 1 parameter, now u need to give 2, as two INs are there

Similar Threads

  1. Oracle Stored Procedure for trimming table
    By Saiful in forum Database
    Replies: 1
    Last Post: 05-02-2001, 06:35 AM
  2. Replies: 0
    Last Post: 11-16-2000, 08:53 AM
  3. VB and Oracle stored Procedures
    By Nicks in forum VB Classic
    Replies: 1
    Last Post: 06-21-2000, 03:44 PM
  4. Replies: 0
    Last Post: 06-14-2000, 02:56 PM
  5. date parameter in Oracle Stored Procedure
    By Naveen in forum VB Classic
    Replies: 1
    Last Post: 06-13-2000, 06:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center