Executing procedures with OUT parameters using Named notation

I have a procedure with two out parameters (p_errortext and p_returncode) and i want to execute this proc in SQL*plus using named notation(using association operator ' => '). For position based execution i usually declare variables to hold the OUT parameter's value. But how can i do this while executing using named notation (using => )
begin
     packagename.generate_ref_record(p_userid  => 'THELMA',
                                  p_ref_code       => '9A',
                                  p_item_id    => '9990000011163',
                                  p_shipno     => '0PH',
                                  p_errortext  =>  ??
                                  p_returncode =>  ??);
end;

SQL>variable x varchar2(30);
SQL>variable y varchar2(30);
SQL>exec packagename.generate_ref_record(p_userid  => 'THELMA',     
                                      p_ref_code       => '9A',       
                                      p_item_id    => '9990000011163',     
                                      p_shipno     => '0PH',     
                                      p_errortext  =>  :x        
                                      p_returncode =>  :y);

Similar Messages

  • Procedure with OUT Parameters - Creating A Report

    I have the following procedure that is used in our internal (non-APEX) apps:
    PROCEDURE SelIssueActivityPublic (
                                                p_results           OUT     SYS_REFCURSOR,
                                                p_IssueID                    IN     ems.issue.issue_id%TYPE,
                                                p_TransactionID         OUT VARCHAR2
                 ) The body of the procedure does a bunch of processing, and inserts data into a staging table. The cursor OUT parameter then returns a SELECT statement from the staging table. Since it's possible for this procedure to be hit multiple times (multiple users), the transaction ID is used to match the data in the staging table to the correct request. The procedure then deletes the data from the staging table. (I'll post it if necessary, but it's quite long, and since it's used in other applications successfully, I don't believe it's relevant to my issue.)
    I have been asked to create an APEX report of the data generated by the procedure. I've never used a procedure with an OUT parameter to set up a report. I was hoping to assign the transaction ID to a hidden variable on page load, and then using it to poplulate the report. I'm not interested in the cursor OUT parameter, I've written my own SELECT statement to grab data from the staging table.
    I tried to create a page computation that did this - item :H_P19_TRANSID, Before Header, computation = EMS.EMS_READER.SelIssueActivityPublic(:H_P19_CURSOR, 454551, :H_P19_TRANSID) [454551 is a test issue id], but I get the following error: ORA-06550: line 1, column 43: PLS-00222: no function with name 'SELISSUEACTIVITYPUBLIC' exists in this scope ORA-06550: line 1, column 7: PL/SQL: Statement ignored flowComp=H_P19_TRANSID
    Error ERR-1030 Error executing computation expression. It seems to be thinking that SelIssueActivityPublic is a function, and I'm not sure why.
    Basically I need to know how to use this existing procedure to set up my report. Once I can get the transaction ID into a page item, I'll be set.

    I never got a chance to finish this report, as I was shuffled to something else with a higher priority. Now that I'm coming back to it, I still have a few issues.
    I created a new function that does all the processing (inserting into the staging table etc.), and returns the transaction id. I then tried to set up a page computation on a hidden item to run this function and store the transaction id.
    In the computation, if I put
    reader.SelIssueActivityPubnocursor(:H_P19_ISSUEID); as the computation, I get ORA-06503: PL/SQL: Function returned without value flowComp=H_P19_TRANSACTIONID as an error. If I put return return reader.SelIssueActivityPubnocursor(:H_P19_ISSUEID); as the computation, I get ORA-06550: line 1, column 50: PLS-00103: Encountered the symbol "EMS" when expecting one of the following: . ( * @ % & = - + ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like like2 like4 likec between || multiset member submultiset The symbol "." was substituted for "EMS" to continue. flowComp=H_P19_TRANSACTIONID as the error. Can someone tell me what's going wrong?

  • Executing Procedure with default parameters !!

    hi want a small help ...
    I have a
    procedure p1(p1 in number default 2, p2 in number default 3)
    begin
    end;
    When the procedure will be called without passing parameters it will execute with default parameters.
    That time I want to dispay message saying
    " AS paramters are not passed, procedure is being executed with foll. default parameters:
    Param 1 = 2
    Param 2 = 3 "
    Now issue is how do I capture this condition that , the parameters are being passed and it is using default parameters ?
    Thanks

    The IF NOT NULL check for the parameters cannot be inside the same procedure becuase when you reach that statement, even though the parameter are not passed to this procedure, at that stage, the parameters will acquire the dfault values already assigned to them. So you never reach the else part of it.
    That;s why i said, use third parameter and assign the value to this third parameter from the calling environment.
    here is the short test case that might help you to understand better.
    SQL> create or replace procedure myproc
      2  (p1               number default 1
      3  ,p2               number default 2
      4  ,parameter_passed char default 'Y') is
      5  begin
      6    if parameter_passed = 'Y' then
      7      dbms_output.put_line('Input values are :'||p1||'='||p2);
      8    else
      9      dbms_output.put_line('Default values are :'||p1||'='||p2);
    10    end if;
    11  end;
    12  /
    Procedure created.
    SQL> PROMPT Test for Case one with input parameter values
    Test for Case one with input parameter values
    SQL>
    SQL> declare
      2   param1 number := 5;
      3   param2 number := 6;
      4  begin
      5   if param1 is not null and param2 is not null then
      6     myproc(param1,param2);
      7   else
      8     myproc(parameter_passed=>'N');
      9   end if;
    10  end;
    11  /
    Input values are :5=6                                                          
    PL/SQL procedure successfully completed.
    SQL>
    SQL> PROMPT Test for Case two with no parameter values
    Test for Case two with no parameter values
    SQL>
    SQL> declare
      2   param1 number := null;
      3   param2 number := null;
      4  begin
      5   if param1 is not null and param2 is not null then
      6     myproc(param1,param2);
      7   else
      8     myproc(parameter_passed=>'N');
      9   end if;
    10  end;
    11  /
    Default values are :1=2                                                        
    PL/SQL procedure successfully completed.
    SQL>

  • Execute procedure with out parameter in sql*plus

    HI All,
    I am executing an stored proc with OUT parameter from sql*plus.
    Getting this error message:
    SQL> execute sp1_cr_ln_num('01',0,3);
    BEGIN sp1_cr_ln_num('01',0,3); END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to
    'sp1_cr_ln_num'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Whereas it works fine using Toad. 4th parameter is for output.
    Thanks.

    then you can see the value either using print :var or execute dbms_output.put_line(:var)

  • Calling stored procedures with output parameters using RDO and VB

    I have a simple test procedure defined as follows:
    CREATE OR REPLACE PROCEDURE test_sp (inval1 IN VARCHAR2,
    inval2 IN NUMBER, inval3 OUT VARCHAR2, inval4 OUT NUMBER) IS
    BEGIN
    inval3 := 'RETURN TEST';
    inval4 := 10;
    END;
    I am attempting to call this procedure from VB 5.0 using RDO and the Oracle ODBC Driver 8.01.06:
    dim rdoQd as rdoQuery
    dim grdoCn as rdoConnection
    strSQL = "{ call test_sp('SOMETHING',?,?,?) }"
    Set rdoQd = grdoCn.CreateQuery("", strSQL)
    rdoQd(0).Direction = rdParamInput
    ' get error# 40041 at above line
    ' "Object Collection: Couldn't ' find item indicated by text."
    rdoQd(0).Type = rdTypeINTEGER
    rdoQd(0).Value = 5
    rdoQd(1).Direction = rdParamOutput
    rdoQd(1).Type = rdTypeVARCHAR
    rdoQd(2).Direction = rdParamOutput
    rdoQd(2).Type = rdTypeINTEGER
    Set rdoApp = rdoQd.OpenResultset()
    MsgBox (CStr(rdoQd(1)))
    MsgBox (CStr(rdoQd(2)))
    When I run this VB code, I get the above mentioned error. If I use placeholders for all parameters (like "{ call test_sp (?,?,?,?) }" ), no error occurs.
    I really need to use the first type of syntax from above and not have to use placeholders for all parameters. Is there a way to accomplish this?
    TIA,
    Esther

    Are you getting any warning while importing the stored procedure?
    Please check the below datatypes:
    While creating the stored procedure, if you have used varchar(MAX), please ALTER it to varchar(255) and reimport to DS.
    Also, the datatype of $message (global variable or local variable) used inside DS should also be varchar(255)
    Try a print statement in between.
    ADMIN.DBO.SPJOBSUMMARY(69,$message,$rtCode,$rtVal);
    print('Message is '||$message);
    smtp_to('leighattest.com.au', 'Results of ' || job_name(), $rtCode || '//' || $rtVal || '~~' || $message || '//', 0,0);
    and see in the job log if DS is able to retrieve the output from DB.
    Regards,
    Suneer

  • Please help....execute procedure with out parameter -cursor

    HI all plese help me,
    i create a stored procedure like this.hw cani execute the IN out parameter which is a cursor ir..RCT1 is cursor..
    please help...
    CREATE OR REPLACE PROCEDURE ST_GetTravelTypeID
         TravelType IN      VARCHAR2 DEFAULT NULL,
         RCT1 IN OUT      GLOBALPKG.RCT1
    AS
    BEGIN
         OPEN RCT1 FOR
         SELECT
                   TravelTypeCode,
                   TravelTypeDesc
         FROM ST_MS_TravelTypes
         WHERE     TravelType = ST_GetTravelTypeID.TravelType;
    END;
    Message was edited by:
    neethu

    Your reference is invalid:
    WHERE TravelType = ST_GetTravelTypeID.TravelType;
    This should not (cannot) refer to the name of the procedure - but simply to the variable in it. I.e.
    WHERE TravelType = TravelType;
    However, as you can see, the variable name is now the same as the column name.
    One method around this is to use explicit scope reference. E.g.
    SELECT
      t.TravelTypeCode,
      t.TravelTypeDesc
    FROM  ST_MS_TravelTypes t
    WHERE t.TravelType = TravelType;I suggest that you consider this a standard for your PL/SQL programming. Always alias SQL tables in PL/SQL code and use explicit column references.
    Another standard we use is to use underscore characters for columns - camel case is fine for variables in a programming language. This is not really acceptable for column names, as by default Oracle uses uppercase. Thus "TravelType" is valid as variable name, but invalid as a column name - it should be defined/written as "travel_type" or "TRAVEL_TYPE" instead.

  • Is there possibility use UCS2 in procedures with out parameters?

    I am trying to use UCS2 character set in my SQL strings. Everything works out nice and smoothly if I am using procedures which require only input parameters (like those which insert data in db).
    But when I try to use procedure containing one output or input/output type parameter, all parameters are shortened by one character (2 bytes) after call. Length of data is ok, but one extra null is set where last character should be. Other characters are like they should be.
    I am using Oracle version 8.1.7 in NT.
    Fist I bind my variables with OCIBindByName and then set OCI_UCS2ID with OCIAttrSet.
    ub2 csid = OCI_UCS2ID;
    m_OCIStatus = OCIAttrSet(
    (dvoid *)handle,
    (ub4) OCI_HTYPE_BIND, (dvoid *) &csid,
    (ub4) 0, (ub4)OCI_ATTR_CHARSET_ID, m_errHndl);
    Am I missing something important or what is wrong?
    Regards
    Mika

    There is no example program. There is extensive help on how to do this. Here's the basics.
    1) There are two ways to define user error codes in LV6.1. If you are using LV6.0 or earlier, only one method is possible.
    2) The 6.0 method involves wiring arrays of error codes and arrays of error code strings to the General Error Handler.vi. These codes will be used to explain any error code which is undefined in LV's internal error code database. Error codes reserved for users which are guaranteed not to be used by NI are from 5000 to 9999.
    3) The 6.1 method allows you to create a specially formatted error code file on disk that will be merged with the LV error code database each time LabVIEW launches. For help on this, go to LV's online help, and in t
    he Index tab, type
    "user-defined error codes, in text files"
    (without the quote marks)
    4) If you want to set an error into the error cluster, use the General Error Handler.vi again. Wire your error code value to the Error Code terminal (the leftmost-topmost corner terminal). Wire the name of your VI to the Error Source terminal, and wire "No Dialog" to the Type of Dialog terminal (left-side, near the bottom). The error code cluster that comes out of this VI will either be the error in (if one was set) or a new error code cluster with your error and the status bit set to TRUE.
    5) The attached demo is written in LV6.0.
    Attachments:
    Error_Demo.vi ‏37 KB

  • Calling a Stored Procedure with output parameters from Query Templates

    This is same problem which Shalaka Khandekar logged earlier. This new thread gives the complete description about our problem. Please go through this problem and suggest us a feasible solution.
    We encountered a problem while calling a stored procedure from MII Query Template as follows-
    1. Stored Procedure is defined in a package. Procedure takes the below inputs and outputs.
    a) Input1 - CLOB
    b) Input2 - CLOB
    c) Input3 - CLOB
    d) Output1 - CLOB
    e) Output2 - CLOB
    f) Output3 - Varchar2
    2. There are two ways to get the output back.
    a) Using a Stored Procedure by declaring necessary OUT parameters.
    b) Using a Function which returns a single value.
    3. Consider we are using method 2-a. To call a Stored Procedure with OUT parameters from the Query Template we need to declare variables of
    corresponding types and pass them to the Stored Procedure along with the necessary input parameters.
    4. This method is not a solution to get output because we cannot declare variables of some type(CLOB, Varchar2) in Query Template.
    5. Even though we are successful (step 4) in declaring the OUT variables in Query Template and passed it successfully to the procedure, but our procedure contains outputs which are of type CLOB. It means we are going to get data which is more than VARCHAR2 length which query template cannot return(Limit is 32767
    characters)
    6. So the method 2-a is ruled out.
    7. Now consider method 2-b. Function returns only one value, but we have 3 different OUT values. Assume that we have appended them using a separator. This value is going to be more than 32767 characters which is again a problem with the query template(refer to point 5). So option 2-b is also ruled out.
    Apart from above mentioned methods there is a work around. It is to create a temporary table in the database with above 3 OUT parameters along with a session specific column. We insert the output which we got from the procedure to the temporary table and use it further. As soon the usage of the data is completed we delete the current session specific data. So indirectly we call the table as a Session Table. This solution increases unnecessary load on the database.
    Thanks in Advance.
    Rajesh

    Rajesh,
    please check if this following proposal could serve you.
    Define the Query with mode FixedQueryWithOutput. In the package define a ref cursor as IN OUT parameter. To get your 3 values back, open the cursor in your procedure like "Select val1, val2, val3 from dual". Then the values should get into your query.
    Here is an example how this could be defined.
    Package:
    type return_cur IS ref CURSOR;
    Procedure:
    PROCEDURE myProc(myReturnCur IN OUT return_cur) ...
    OPEN myReturnCur FOR SELECT val1, val2, val3  FROM dual;
    Query:
    DECLARE
      MYRETURNCUR myPackage.return_cur;
    BEGIN
      myPackage.myProc(
        MYRETURNCUR => ?
    END;
    Good luck.
    Michael

  • Oracle Stored Procedure with out parameter

    Good morning,
    Is it possible to use an Oracle stored procedure with out parameters in MII ?
    If yes, what is the manipulation to see the values of parameters Out?
    Thank you

    Michael,
    This is the  MII query template  :
    DECLARE
    STRCOMPTERENDU NVARCHAR2(200);
    BEGIN
    STRCOMPTERENDU := NULL;
    XMII.SP_VALIDATEPROCESSORDERSLIST2 ( STRCOMPTERENDU => [Param.1]  );
    COMMIT;
    END;
    and the stocked procedure code
    CREATE OR REPLACE PROCEDURE XMII.SP_ValidateProcessOrdersList2(strCompteRendu OUT nVarchar2) IS
    tmpVar NUMBER;
    debugmode INT;
    strClauseSql varchar(2048);
    strListPOactif varchar(1024);
    dtmTimeStamp DATE;
       NAME:       SP_ValidateProcessOrdersList
       PURPOSE:   
       REVISIONS:
       Ver        Date        Author           Description
       1.0        18/06/2008          1. Created this procedure.
       NOTES:
       Automatically available Auto Replace Keywords:
          Object Name:     SP_ValidateProcessOrdersList
          Sysdate:         18/06/2008
          Date and Time:   18/06/2008, 18:45:32, and 18/06/2008 18:45:32
          Username:         (set in TOAD Options, Procedure Editor)
          Table Name:       (set in the "New PL/SQL Object" dialog)
    BEGIN
       tmpVar := 0;
       debugmode := 0;
       -- lecture date systeme pour time stamp
       select sysdate  into dtmTimeStamp from dual;
       if debugmode = 1 then
        DBMS_OUTPUT.put_line('SP_ValidateProcessOrdersList');
       end if;
       -- insertion du bloc dans le log
       insert into LOG_ORDER
        (DATE_ORDER,BLOCK_ORDER,ID_LOG_ORDER)
       values
       (dtmTimeStamp,'SP_ValidateProcessOrdersList',ID_LOG_ORDER.nextval);
       Commit;
        if debugmode = 1 then
        DBMS_OUTPUT.put_line('insertion LOG OK');
       end if;
    strCompteRendu := '0123456-896;0123456-897';
    commit; 
       EXCEPTION
         WHEN NO_DATA_FOUND THEN
           NULL;
         WHEN OTHERS THEN
         ROLLBACK;
         -- insertion du bloc dans le log
       insert into LOG_ORDER
        (DATE_ORDER,BLOCK_ORDER,ID_LOG_ORDER)
       values
       (dtmTimeStamp,' ',ID_LOG_ORDER.nextval);
       COMMIT;
           -- Consider logging the error and then re-raise
           RAISE;
    END SP_ValidateProcessOrdersList2;
    Thanks for your help
    Alexandre

  • Executing sql server procedure  from oracle via db link with out parameters

    HI
    we have successfully created the link between oracle and sql server via DB LINK also able to access table from the
    sqlserver via dblink
    Can any one tell me how to execute procedure with 1 input and 4 out parameters from pl\sql
    is it possible using
    dbms_hs_passthrough

    You should be able to call it like you would any other procedure:
    dbo.procedure_name@dblink(parameter_list);

  • How can I execute a Procedure with OUT variable is %ROWTYPE on SQL Prompt

    Hi,
    I have a procedure with OUT variable is %ROWTYPE
    How can I execute the following procedure on SQL prompt.
    (without creating anonymous block)
    CREATE OR REPLACE PROCEDURE zz_sp_EMP(VEMPNO IN EMP.EMPNO%TYPE,
    V_REC IN OUT EMP%ROWTYPE)
    AS
    BEGIN
    SELECT * INTO V_REC FROM EMP WHERE EMPNO = VEMPNO;
    END;
    Thanks & Regards,
    Naresh

    as previous posters said: it's not possible to do this without declaring a variable in the anonymous block.
    With anonymous block it would look like this (had to change it a bit, since i'm using hr-schema on oracle XE):
    declare
    l_rec EMPLOYEES%ROWTYPE;
    begin
    zz_sp_EMP(VEMPNO => 100, V_REC => l_rec);
    DBMS_OUTPUT.PUT_LINE ( 'first_name = ' || l_rec.first_name );
    DBMS_OUTPUT.PUT_LINE ( 'last_name = ' || l_rec.last_name );
    end;
    first_name = Steven
    last_name = King

  • Using a StoredProcedure with OUT parameters in CrystalReports

    Hi All,
    I am creating a report using CrystalReport Designer 2008.I have a StoredProcedure which takes 2 input parameters,2 output parameters and a cursor.I am not able to add this SP directly using the DatabaseExpert. if I use
    'call SP1(input1,input2,input3,input4,@output1,@output2)' from AddCommand option then it gets added as a Command but the tree under Command does not expand and it does not allow me to use the output parameters in my reports.
    Hence,can anyone please help me here such that how should I use this SP with out parameters in my CrystalReports.Also note that I am able to use StoredProcedure with only input parameters,with input parameters and cursor in my CrystalReports.Should I do something extra to add this StoredProcedure in my CrystalReports?
    Any help for this issue would be highly appreciated.
    Regards.
    Ajit

    Ajit,
    If you are using a Command, you execute a SP in CR with the same syntax that you would in the databases native environment.The only difference is that you'll need to add CR parameters so that the inputs can be added to the SP's input parameters.
    So, using your example... 'call SP1({?input1}, {?input2}, {?input3} , {?input4}, output1, output2)'
    I'm not familiar with this particular syntax but hopefully you get the idea.
    If you want to hard code the input parameters (and not have them prompt in CR), just hard code them in the command.
    HTH,
    Jason
    Edited by: Jason Long on Aug 25, 2010 2:15 PM

  • How to write a shell script to execute a procedure with out parameter

    Hi,
    How to write a shell script to execute a procedure with out parameter.
    here is my procedure
    PROCEDURE sample(invar1 VARCHAR2,
    invar2 VARCHAR2,
    invar3 VARCHAR2,
    invar4 VARCHAR2,
    ecode out number);
    Any example really helpfull
    Thanks in advance

    Or if we're passing values in, maybe something like:
    Test procedure:
    CREATE OR REPLACE PROCEDURE p (myin IN VARCHAR2, myout OUT VARCHAR2)
    AS
    BEGIN
        myout :=
            CASE myin
                WHEN 'A' THEN 'APPLE'
                WHEN 'B' THEN 'BANANA'
                ELSE 'STARFRUIT'
            END;
    END;Shell script:
    #!/bin/bash
    my_shell_variable=$1
    unset ORACLE_PATH
    sqlplus -s un/pw@db <<-EOF
    set feedback off pause off
    set pagesize 0
    set autoprint off
    VAR out varchar2(30)
    VAR myin varchar2(30)
    exec :myin := '${my_shell_variable}'
    BEGIN
      p(:myin, :out);
    END;
    print out
    exit
    EOFTest:
    /Users/williamr: xx A
    APPLE
    /Users/williamr: xx B
    BANANA
    /Users/williamr: xx
    STARFRUITObviously in a real script you would not hardcode the password or let it show in a "ps" listing.
    Message was edited by:
    William Robertson

  • Calling a stored procedure with default parameters

    Dear all,
    I am trying to call a stored procedure that has not all the parameters compulsory, and indeed, there are some I am not interested in. Therefore, I would like to call the stored procedure initializing only some of the parameters but if I miss some of them, I have an SQLException thrown. Is there any way to do that?
    Thanks
    Marie

    Hi
    One way to do it is ---
    By using Default Parameters you can miss few parameters while calling a procedure.
    =================================================================
    As the example below shows, you can initialize IN parameters to default values. That way, you can pass different numbers of actual parameters to a subprogram, accepting or overriding the default values as you please.
    Moreover, you can add new formal parameters without having to change every call to the subprogram.
    PROCEDURE create_dept (
    new_dname VARCHAR2 DEFAULT 'TEMP',
    new_loc VARCHAR2 DEFAULT 'TEMP') IS
    BEGIN
    INSERT INTO dept
    VALUES (deptno_seq.NEXTVAL, new_dname, new_loc);
    END;
    If an actual parameter is not passed, the default value of its corresponding formal parameter is used.
    Consider the following calls to create_dept:
    create_dept;
    create_dept('MARKETING');
    create_dept('MARKETING', 'NEW YORK');
    The first call passes no actual parameters, so both default values are used.
    The second call passes one actual parameter, so the default value for new_loc is used.
    The third call passes two actual parameters, so neither default value is used.
    Usually, you can use positional notation to override the default values of formal parameters.
    However, you cannot skip a formal parameter by leaving out its actual parameter.
    For example, the following call incorrectly associates the actual parameter 'NEW YORK' with the formal parameter new_dname:
    create_dept('NEW YORK'); -- incorrect
    You cannot solve the problem by leaving a placeholder for the actual parameter.
    For example, the following call is illegal:
    create_dept(, 'NEW YORK'); -- illegal
    In such cases, you must use named notation, as follows:
    create_dept(new_loc => 'NEW YORK');
    ===============================================================
    For more details refer URL http://technet.oracle.com/doc/server.804/a58236/07_subs.htm#3651
    Hope this helps
    Regards
    Ashwini

  • Calling stored procedure with output parameters in a different schema

    I have a simple stored procedure with two parameters:
    PROCEDURE Test1(
    pOutRecords OUT tCursorRef,
    pIdNumber IN NUMBER);
    where tCursorRef is REF CURSOR.
    (This procedure is part of a package with REF CURSOR declared in there)
    And I have two database schemas: AppOwner and AppUser.
    The above stored procedure is owned by AppOwner, but I have to execute this stored procedure from AppUser schema. I have created a private synonym and granted the neccessary privileges for AppUser schema to execute the package in the AppUser schema.
    When I ran the above procedure from VB using ADO and OraOLEDB.Oracle.1 driver, I got the following error when connecting to the AppUser schema:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'TEST1'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    but when I was connecting to the AppOwner schema, everything is running correctly without errors.
    Also, when I switch to the microsoft MSDAORA.1 driver, I can execute the above procedure without any problems even when connecting to the AppUser schema.
    I got this error only when I am trying to execute a stored procedure with an output parameter. All other procedures with only input parameters have no problems at all.
    Do you know the reason for that? Thanks!

    If anyone has figured this one out let me know. I'm getting the same problem. Only in my case I've tried both the "OraOLEDB.Oracle" provider and the "MSDAORA" provider and I get an error either way. Also my procedure has 2 in parameters and 1 out parameter. At least now I know I'm not the only one with this issue. :)
    '*** the Oracle procedure ***
    Create sp_getconfiguration(mygroup in varchar2, myparameter in varchar2, myvalue out varchar2)
    AS
    rec_config tblconfiguration.configvalue%type;
    cursor cur_config is select configvalue from tblconfiguration where configgroup = mygroup and configparameter = myparameter;
    begin
    open cur_config;
    fetch cur_config into rec_config;
    close cur_config;
    myvalue := rec_config;
    end;
    '** the ado code ****
    dim dbconn as new adodb.connection
    dim oCmd as new adodb.connection
    dim ors as new adodb.recordset
    dbconn.provider = "MSDAORA" 'or dbconn.provider = "OraOLEDB.Oracle"
    dbconn.open "Data Source=dahdah;User ID=didi;Password=humdy;PLSQLRSet=1;"
    set ocmd.activeconnection = dbconn
    cmd.commandtext = "{call fogle.sp_getconfiguration(?,?)}"
    'i've also tried creating a public synonym called getconfiguration and just refering to procedure by that.
    ' "{call getconfiguration(?, ?)}"
    ' "{call getconfiguration(?,?, {resultset 1, myvalue})}"
    'and numerous numerous other combinations
    set oPrm = cmd.createparameter("MYGROUP", advarchar, adparaminput, 50, strGrouptoPassIn$)
    cmd.parameters.append oPrm
    set oPrm = cmd.createParameter("MYPARAMETER", advarchar, adParamInput, 50, strParameterToPassIn$)
    cmdParameters.append oPrm
    set rs = cmd.execute

Maybe you are looking for

  • Joining 18 tables -- one at a time or in two stages ?? best one..??

    I have to join 18 tables,.. Is it best to join all 18 in a single shot or to go with multi stages-- 9 tables in one stage and after that anotther 9 tables.. Please anyone give me a good suggestion on this with some reason... Thanks in advance

  • Opinion question

    So, I "took the plunge", and decided to buy my first mac. I decided on a Mac Book Pro. So I go to the apple store, and pick out the 15" MBP with the glossy screen. I take it to check out and it all looks good. They apply my $200 student discount, but

  • Trouble doing a database upgrade test for SCCM upgrade from SP1 to SP2

    I'm trying to do this test and am having trouble.  I'm following the instructions in http://technet.microsoft.com/en-us/library/bb693648.aspx.  However when I enter the command at a command prompt: setup /testdbupgrade e:\database test\sms_hlb_new I

  • Since Lion system profiler is now a question mark in the dock. Can i get it back?

    Since Lion, system profiler is now a question mark in the dock. Can I get it back? dsso

  • Not updating ztable

    Hi experts, Please help me. following is my code to update ZTABLE. LOOP AT t_coil INTO w_coil.      SELECT SINGLE * FROM zstock                      INTO w_stock                      WHERE coilno = w_coil-coilno                      AND slitid = w_co