Call SP with application block (daab) & multiple out  REF CURSOR parameters

Hi,
I'm using Microsoft's data application blocks to execute a stroed procedure that look like this: (Note that I have not included the package declaration nor the T_CURSOR type declaration since it's working fine when I execute this procedure in a tool like TOAD or else)
PROCEDURE qryTest(EMPLOYEE_ID IN VARCHAR, EMP_CUR OUT T_CURSOR, TASK_CUR OUT T_CURSOR)
     IS
     BEGIN     
          OPEN EMP_CUR FOR          
               SELECT DISTINCT EMP_ID,
                    FIRSTNAME || ' ' || LASTNAME AS FULLNAME
               FROM EMPLOYEE_TABLE     WHERE EMP_ID = EMPLOYEE_ID;
          OPEN TASK_CUR FOR          
               SELECT DISTINCT T1.TASK_ID,
                    T1.TASKNAME
               FROM TASK_TABLE     T1 INNER JOIN EMPLOYEE_TABLE T2 ON T1.EMP_ID = T2.EMP_ID     WHERE T2.EMP_ID = EMPLOYEE_ID;
END qryTest;
Then, I try to execute this SP from the data app blocks this way:
First, I have a function that acts as a definition block to call the generic method calling the SP (VB.NET):
Private Function getEmployees() As DataSet
Dim prms(2) As OracleParameter
prms(0) = New OracleParameter("EMPLOYEE_ID", OracleType.VarChar, 20, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Default, "6586")
prms(1) = New OracleParameter("EMP_CUR", OracleType.Cursor, 30000, ParameterDirection.Output, True, 0, 0, "", DataRowVersion.Default, Nothing)
prms(2) = New OracleParameter("TASK_CUR", OracleType.Cursor, 30000, ParameterDirection.Output, True, 0, 0, "", DataRowVersion.Default, Nothing)
ds = DataBaseLAyer.ExecuteOracleProcedure("qryTest", False, prms)
Return ds
End Function
And this is the function that execute the SP using the app blocks (C#):
          public static DataSet ExecuteOracleProcedure(string procName, bool createEmptyRow, params OracleParameter[] parameters)
               Database db = DatabaseFactory.CreateDatabase("DBPACKAGENAME");
               DBCommandWrapper cmd = db.GetStoredProcCommandWrapper(procName);
               if(parameters != null)
                    foreach(OracleParameter param in parameters)
                         if(param.Direction == ParameterDirection.Input)
                              cmd.AddInParameter(param.ParameterName, param.DbType, param.Value);
                         else
                              cmd.AddOutParameter(param.ParameterName, param.DbType, param.Size);
               DataSet ds = db.ExecuteDataSet(cmd);
               return ds;
When DataSet ds = db.ExecuteDataSet(cmd); is executed, I get this error:
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'QRYTEST' ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'QRYTEST'
The procedure runs perfectly in TOAD but in here, it gives me this error several times in the same message...
I did some tests and if I add another REF CURSOR (T_CURSOR) output param, I will get the error 3 times in the stack trace and so on...
I know that the app block adds an out param implicitly which has to be named "cur_OUT" in my SP, which I TRIED without any success...
Someone can help?
Thanks for reading!

My issue was that I was setting up my parameter in code as a DbType.Boolean. From what I could tell, the EntLib sends a 0/1 to the procedure and not a TRUE/FALSE which is what PL/SQL is expecting. My application works with both SQL Server and Oracle and SQL Server is smart enough (...ducking...) to figure it out that a 0 means false and a 1 means true. It does the conversion for you in T-SQL. Oracle has no clue. I spent way longer on this issue than I should have because I kept seeing posts that said "PL/SQL accepts BOOLEAN variables". Yea, well don't use them in this scenario. I ended up changing the parameter to use DbType.TinyInt and my problem went away. I suggest you try changing your parameters to NUMBER(1) and then to DbType.TinyInt in code and it should work just fine.
I've only worked with PL/SQL for 2 months now so maybe I am missing something obvious but trying to find a post on this kind of thing is next to impossible.
Let me know if that helped.
Greg

Similar Messages

  • Output Parameters with Application Block's SqlHelper

    Hi,
    I want to use the Microsoft Application Blocks SqlHelper class with some of my stored procedures that have output parameters, but I can't figure out how?
    SqlParameter[] parameters = new SqlParameter[1];
    parameters[0] = new SqlParameter("@SomeID", object.Id).Direction = ParameterDirection.Output;
    SqlHelper.ExecuteNonQuery(this.sqlConnectionString, "spMisc", parameters);
    However, how do I get the value of the output parameter?
    Thanks,
    Weiran.

    Create new method into SQLHelp and get the value of the returned object:
    public static object[] ExecuteNonQueryReturnValue(string connectionString, string spName, params object[] parameterValues)
    if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString");
    if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName");
    int mRet;
    object[] mObjRet = new object[parameterValues.Length];
    // If we receive parameter values, we need to figure out where they go
    if ((parameterValues != null) && (parameterValues.Length > 0))
    // Pull the parameters for this stored procedure from the parameter cache (or discover them & populate the cache)
    SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connectionString, spName);
    // Assign the provided values to these parameters based on parameter order
    AssignParameterValues(commandParameters, parameterValues);
    // Call the overload that takes an array of SqlParameters
    mRet = ExecuteNonQuery(connectionString, CommandType.StoredProcedure, spName, commandParameters);
    for (int idx = 0; idx < commandParameters.Length; idx++)
    mObjRet[idx] = commandParameters[idx].Value;
    else
    // Otherwise we can just call the SP without params
    mRet = ExecuteNonQuery(connectionString, CommandType.StoredProcedure, spName);
    return mObjRet;
    //Vital
     

  • Problem to call stored procedure with several IN pars and single REF Cursor

    Hi,
    Oracle 9.2.0.1
    Ole DB Provider I've got with ODP 9.2.0.4
    First I try to call packaged procedure with single
    REF CURSOR - it works fine(PROCEDURE getDep(dep OUT DEPART.refcur) IS ...).
    When I try to call procedure with additional IN parameter, I get an error ORA-01008: not all variables bound.
    Packaged procedure: PROCEDURE getDep(dep OUT DEPART.refcur, i1 IN number) IS .... and so on.
    Try to call from C#:
    cmd.CommandText = "{call depart.getDep(?)}";
    OleDbParameter par0 = cmd.CreateParameter();
    par0.Value = some value;
    par0.DbType = DbType.Int16;
    par0.OleDbType = OleDbType.Integer;
    par0.Direction = ParameterDirection.Input;
    OleDbDataAdapter da = new OleDbDataAdapter(cmd.CommandText,con);
    DataSet ds = new DataSet();
    da.Fill(ds);
    Connection string:
    "Provider=OraOLEDB.Oracle;User Id=scott;Password=tiger;Data Source=ora92;OLEDB.NET=true;PLSQLRSet=true"
    Please, HELP !
    Thanks in advance,
    Vyacheslav

    Hi,
    Are you using OLEDB.NET driver (System.Data.Oledb) or ODP.NET driver (Oracle.DataAccess)?
    If you are using ODP.NET, remember that you need to bind the refcursor output variable also (besides the numbder)
    Arnold

  • Toplink support for stored procedure with 2 OUT  REF CURSOR ?

    Can Toplink StoredProcedureCall be used with Oracle PLSql procedure with 2 OUT parameters. Parameter type is Ref Cursor (Oracle PLSQL resulset)
    Regards

    In a TopLink StoredProcedureCall using an OUT CURSOR the cursor is assumed to map to the result set for the TopLink query.
    For example if you had a stored procedure READ_ALL_EMP that returned a out cursor of EMP rows, you could use that procedure in a TopLink mapped Employee class mapped to the EMP table and use the stored procedure in a ReadAllQuery for the Employee class.
    If the procedure does not return data that maps to objects, you can use a DataReadQuery to access the data. The out cursor would be returned as a Vector of DatabaseRows that contain the data from the cursor rows.
    If the procedures data is complex and does not map to objects, it may be better to access the procedure directly through JDBC.

  • An issue with Dynamic SQL within Package using REF CURSOR

    Hi there,
    In the following package first two procedures works file but since I have added the third one ( GET_CONTRACT_BY_DYN_SQL) it does not work for me. When I try to compile and save it gives below error.
    "Error(6,15): PLS-00323: subprogram or cursor 'GET_CONTRACT_BY_DYN_SQL' is declared in a package specification and must be defined in the package body"
    Can you please help?
    Package Header
    create or replace
    PACKAGE CONTRACTS_PKG AS
    TYPE T_CURSOR IS REF CURSOR;
    PROCEDURE GET_CONRACTS (IO_CURSOR IN OUT T_CURSOR);
    PROCEDURE GET_CONTRACT_BY_ID (I_CONTRACTID IN NUMBER, IO_CURSOR IN OUT T_CURSOR);
    PROCEDURE GET_CONTRACT_BY_DYN_SQL(P_CONTRATID IN NUMBER, P_COLS IN VARCHAR2, IO_CURSOR IN OUT T_CURSOR);
    END CONTRACTS_PKG;
    Package Body
    create or replace
    PACKAGE BODY CONTRACTS_PKG AS
    -- Get All Contracts
    PROCEDURE GET_CONRACTS(IO_CURSOR IN OUT T_CURSOR)
    IS
    V_CURSOR T_CURSOR;
    BEGIN
    OPEN V_CURSOR FOR
    SELECT * FROM CONTRACTS;
    IO_CURSOR := V_CURSOR;
    END GET_CONRACTS;
    -- Get Contract By ID
    PROCEDURE GET_CONTRACT_BY_ID(I_CONTRACTID IN NUMBER, IO_CURSOR IN OUT T_CURSOR)
    IS
    V_CURSOR T_CURSOR;
    BEGIN
    OPEN V_CURSOR FOR
    SELECT * FROM CONTRACTS WHERE contract_id = I_CONTRACTID;
    IO_CURSOR := V_CURSOR;
    END GET_CONTRACT_BY_ID;
    -- Get Contract Using Dynamic SQL
    PROCEDURE GET_CONTRACT_BY_DYN_SQL(P_CONTRACTID IN NUMBER, P_COLS IN VARCHAR2, IO_CURSOR IN OUT T_CURSOR)
    IS
    V_CURSOR T_CURSOR;
    V_SQL VARCHAR2(200);
    BEGIN
    V_SQL := 'SELECT '|| P_COLS || ' FROM CONTRACTS WHERE contract_id = ' || P_CONTRACTID ;
    --OPEN V_CURSOR FOR
    --EXECUTE IMMEDIATE V_SQL INTO V_CURSOR;
    OPEN V_CURSOR FOR V_SQL;
    EXECUTE IMMEDIATE V_SQL;
    --IO_CURSOR := V_CURSOR;    
    END GET_CONTRACT_BY_DYN_SQL;
    END CONTRACTS_PKG;
    Thanks in advance.
    Hitesh

    Thanks guys. Finally I have tweaked as per your suggestions and it's working for all 3 cases (stored procedures).
    Oracle
    ======
    Package Header
    create or replace
    PACKAGE CONTRACTS_PKG AS
    TYPE T_CURSOR IS REF CURSOR;
    PROCEDURE GET_CONRACTS (IO_CURSOR IN OUT T_CURSOR);
    PROCEDURE GET_CONTRACT_BY_ID (I_CONTRACTID IN NUMBER, IO_CURSOR IN OUT T_CURSOR);
    PROCEDURE GET_CONTRACT_BY_DYN_SQL(P_CONTRACTID IN NUMBER, P_COLS IN VARCHAR2, IO_CURSOR IN OUT T_CURSOR);
    END CONTRACTS_PKG;
    Package Body
    create or replace
    PACKAGE BODY CONTRACTS_PKG AS
    -- Get All Contracts
    PROCEDURE GET_CONRACTS(IO_CURSOR IN OUT T_CURSOR)
    IS
    V_CURSOR T_CURSOR;
    BEGIN
    OPEN V_CURSOR FOR
    SELECT * FROM CONTRACTS;
    IO_CURSOR := V_CURSOR;
    END GET_CONRACTS;
    -- Get Contract By ID
    PROCEDURE GET_CONTRACT_BY_ID(I_CONTRACTID IN NUMBER, IO_CURSOR IN OUT T_CURSOR)
    IS
    V_CURSOR T_CURSOR;
    BEGIN
    OPEN V_CURSOR FOR
    SELECT * FROM CONTRACTS WHERE contract_id = I_CONTRACTID;
    IO_CURSOR := V_CURSOR;
    END GET_CONTRACT_BY_ID;
    -- Get Contract Using Dynamic SQL
    PROCEDURE GET_CONTRACT_BY_DYN_SQL(P_CONTRACTID IN NUMBER, P_COLS IN VARCHAR2, IO_CURSOR IN OUT T_CURSOR)
    IS
    V_CURSOR T_CURSOR;
    V_SQL VARCHAR2(200);
    BEGIN
    IF p_contractid > 0 THEN
    V_SQL := 'SELECT '|| P_COLS || ' FROM CONTRACTS WHERE contract_id = ' || P_CONTRACTID ;
    ELSE
    V_SQL := 'SELECT '|| P_COLS || ' FROM CONTRACTS';
    END IF;
    OPEN V_CURSOR FOR V_SQL;
    IO_CURSOR := V_CURSOR;
    END GET_CONTRACT_BY_DYN_SQL;
    END CONTRACTS_PKG;
    ColdFusion (calling app code)
    =====================
    <cfstoredproc procedure="CONTRACTS_PKG.GET_CONTRACT_BY_ID" datasource="#REQUEST.dsn#">
         <cfprocparam cfsqltype="CF_SQL_INTEGER" type="in" value="1" variable="I_CONTRACTID">
         <cfprocresult name="qData" resultset="1">
    </cfstoredproc>
    <br>Single Contract:
    <cfdump var="#qData#" label="Single Contract">
    <cfstoredproc procedure="CONTRACTS_PKG.GET_CONRACTS" datasource="#REQUEST.dsn#">     
         <cfprocresult name="qDataAll" resultset="1">
    </cfstoredproc>
    <br>All Contracts:
    <cfdump var="#qDataAll#" label="All Contracts">
    <cfstoredproc procedure="CONTRACTS_PKG.GET_CONTRACT_BY_DYN_SQL" datasource="#REQUEST.dsn#">
         <cfprocparam cfsqltype="CF_SQL_INTEGER" type="in" value="1" variable="P_CONTRACTID">
         <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="in" value="contract_number,contract_title,created_date" variable="P_COLS">
         <cfprocresult name="qDataDynSQL" resultset="1">
    </cfstoredproc>
    <br>Dynamic SQL Query:
    <cfdump var="#qDataDynSQL#" label="Dynamic SQL Query">
    Thanks,
    Hitesh Patel

  • How to build a DLL that has Pascal calling conventions with application builder?

    Hi,
    I'm researching for possible solution to one of our problems.
    In one case, solution would be to build a DLL from LabView
    code. This should be simple task, but the application that
    is going to load the DLL requires that the functions in the
    library are exported using Pascal calling conventions,
    similar to the C/C++ example code below.
    DWORD APPEXPORT far APPPASCAL function(char hexr[])
    Could this be possible with LabView somehow? Or is it best just
    to write the DLL with C/C++?
    Thanks.

    Thanks Wiebe.
    I don't know whether I need pass string pointers or not. The example
    I posted was from the manual of the program that will be using the DLL
    I build with LabView. I only wanted to show with it the exported calling
    convention needed. It seems that it actually confused my question rather
    than clearing it.
    Anyway, now I know that it's possible to declare the calling convention
    when building the DLL. And it's always good to know that I might encounter
    different pointer types on the way, this may actually save me from a lot of
    debugging some day.

  • Problems calling stored procedure with out ref cursors

    Hi,
    I am calling an oracle stored procedure and having problems. This is the code:
    ResultSet cursor1, cursor2, cursor3, cursor4,cursor5,cursor6;
    String sql = "BEGIN SYSADM.PKG_SERVICE.SERV_MAIN(:1,:2,:3,:4,:5,:6,:7,:8,:9) \n; END;";
    CallableStatement call = null;
    try
    call = conn.prepareCall(sql);
    call.setString(1,blah1);
    call.setString(2,blah2);
    call.setString(3,blah3);
    call.registerOutParameter(4,OracleTypes.CURSOR);
    call.registerOutParameter(5,OracleTypes.CURSOR);
    call.registerOutParameter(6,OracleTypes.CURSOR);
    call.registerOutParameter(7,OracleTypes.CURSOR);
    call.registerOutParameter(8,OracleTypes.CURSOR);
    call.registerOutParameter(9,OracleTypes.CURSOR);
    call.execute();
    cursor1 = ((OracleCallableStatement) call).getCursor(4);
    cursor2 = ((OracleCallableStatement) call).getCursor(5);
    cursor3 = ((OracleCallableStatement) call).getCursor(6);
    cursor4 = ((OracleCallableStatement) call).getCursor(7);
    cursor5 = ((OracleCallableStatement) call).getCursor(8);
    cursor6 = ((OracleCallableStatement) call).getCursor(9);
    on the cursor1 = line I get this exception:
    06/08/08 15:07:01 java.lang.ClassCastException: com.evermind.sql.FilterCallableStatement
    this is a web service running in JDeveloper 10.1.2
    Dennis

    Dennis,
    There is only one "data-sources.xml" file in my JDeveloper 10.1.3. It is in the "\j2ee\home\config" subdirectory.
    But the again, I have not used my JDeveloper to create any Web services.
    I really think you should try the JDeveloper and ADF forum.
    Also, there are several debug properties you can set for OC4J.
    Since you say you are using 10.1.2, the following Web page may be helpful:
    http://www.oracle.com/technology/tech/java/oc4j/htdocs/oc4j-logging-debugging-technote.html
    Good Luck,
    Avi.

  • Error calling a  stored procedure returning a PLSQL table /  REF cursor

    stored proceure declares -
    TYPE A_rec IS RECORD (
    date DATE,
    id NUMBER(10),
    start NUMBER (10),
    end NUMBER (10)
    TYPE tmp_tbl IS TABLE OF A_rec ;
    PROCEDURE get_B(
    p_id IN NUMBER,
    p_startdate IN DATE,
    p_enddate IN DATE,
    p_tbl OUT tmp_tbl
    My Java code reads -
    StoredProcedureCall storedProcedureCall = new StoredProcedureCall();
    storedProcedureCall.setProcedureName("get_B");
    DataReadQuery query = new DataReadQuery();
    query.setCall(storedProcedureCall);
    Vector parameters = new Vector();
    /** For all input params **/
    query.addArgument(param.getInputParamName(" name");
    parameters.add("values");
    /** Now comes the OUT part .. i am not sure what to do **/
    storedProcedureCall.useNamedCursorOutputAsResultSet("p_tbl ");
    /** execute query **/
    Vector result = (Vector) getSession(ctx).executeQuery(query, parameters);
    ------------- My program does not throw any error ... but does not return anything ----

    TopLink currently doesn't support pl/sql types to be used as stored procedures parameters - but version 11 will.
    However you can use a single cursor as an out parameter in your stored procedure:
    p_tbl OUT CURSOR_TYPE.ANY_CURSOR,
    and it will be returned by TopLink.

  • 64bit OraOLEDB failed when calling stored procedure with Ref Cursor

    Hi everyone,
    I used the ADO VB sample provided with the Oracle 10g provider installation.
    But I compiled it in 64bit Visual Studio 2005 and ran on Windows 2003 x64 server.
    The function call "cmd.Execute" when it is trying to call a stored procedure which has an Out Ref Cursor parameter. The exception is
    "PLS-00306: wrong number or types arguments in call"
    I already set the property "PLSQLRSet" to true. But it doesn't help.
    The same code works if I compiled in 32 bit.
    It also works if the stored procedure does not have Ref Cursor parameter.
    I am guessing this is a bug in the 64bit Oracle provider. Anyone can confirm this please? or am I missing anything?
    Wilson

    It appears to work with 11.1.0.6.20 OLEDB provider but only for ExecuteNonQuery, I'm not able to work with Fill, and yes... in x86 works perfectly, but in x64 we are still having the ORA-06550 and PLS-00306 error.
    Our Connection string is as follows:
    "Provider=OraOLEDB.Oracle.1;OLEDB.NET=true;Password=xxxxx;Persist Security Info=True;User ID=exxxxx;Data Source=ECOR; PLSQLRSet=True"
    We are not using ODP.NET.
    Can you confirm that Fill method works with such update?

  • Call Ref cursors in DAAB

    Hi,
    I have one procedure in Oracle which is returning the REF Cursor I am accessing it by using the Data access application block DAAB like the following:
    OracleParameter param = new OracleParameter();
    param.ParameterName = "Emp_Cursor";
    param.OracleType = OracleType.Cursor;
    param.Direction = ParameterDirection.Output;
    param.Size = 3000;
    Database db = DatabaseFactory.CreateDatabase("DBConnection");
    //DbCommand cmd = db.GetSqlStringCommand("Select * from emp");
    DbCommand cmd = db.GetStoredProcCommand("emppackage.select_employee");
    db.AddOutParameter(cmd, param.ParameterName, param.DbType, param.Size);
    DataSet ds = new DataSet();
    ds = db.ExecuteDataSet(cmd);
    GridView1.DataSource = ds;
    GridView1.DataBind();
    But iam getting this error:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'SELECT_EMPLOYEE'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    How to call Ref Cursors in DAAB.
    Thanks in advance.

    Hi.
    I'm having the same problem. My package is as follows:
    CREATE OR REPLACE PACKAGE PKG_COOPERATORS AS
    TYPE T_CURSOR IS REF CURSOR;
    PROCEDURE SP_FETCH_PARTY(vPARTY_ID IN NUMBER, curParty OUT T_CURSOR);
    END PKG_COOPERATORS;
    CREATE OR REPLACE PACKAGE BODY PKG_COOPERATORS AS
    PROCEDURE SP_FETCH_PARTY (vPARTY_ID IN NUMBER, curParty OUT T_CURSOR)
    AS
    BEGIN
    OPEN curParty FOR
    SELECT *
    FROM
    PARTY
    WHERE
    PARTY_ID = vPARTY_ID
    END SP_FETCH_PARTY;
    END PKG_COOPERATORS;
    My code is as follows:
    Database db = DatabaseFactory.CreateDatabase();
    using (DbCommand cm = db.GetStoredProcCommand(proc))
    db.AddInParameter(cm, "vPARTY_ID", System.Data.DbType.Int64, 1);
    db.AddOutParameter(cm, "curParty", System.Data.DbType.Object, 0);
    SafeDataReader dr = new SafeDataReader(db.ExecuteReader(cm));
    I've also used KALK's method of
    System.Data.OracleClient.OracleParameter param = new System.Data.OracleClient.OracleParameter();
    param.ParameterName = "curParty";
    param.OracleType = System.Data.OracleClient.OracleType.Cursor;
    param.Size = 3000;
    db.AddOutParameter(cm, param.ParameterName , param.DbType.Object, param.Size);
    and get the exact same error.
    Thanks in advance,
    Jamie

  • Calling Webdynpro Java Application from Webdynpro ABAP Application.

    Hi,
    We have developed one Application using Webdynpro Java and I m in need to call the Webdynpro Java application from Webdynpro ABAP.
    Require Suggestions to acheive this.
    Thanks In advance.
    Reg,
    Ajay.

    Dear Ajay,
    Assuming that both your applications WDA & WDJ are in the portal & you don't have to pass any parameters to the WDJ application.
    Write the following code on the action  where you would call the WDJ application.
      DATA:
            lr_compcontroller TYPE REF TO ig_componentcontroller,
            l_component TYPE REF TO if_wd_component ,
            lr_port_manager TYPE REF TO if_wd_portal_integration ,
            wa_navigation TYPE navigation.
      lr_compcontroller =   wd_this->get_componentcontroller_ctr( ).
      l_component = lr_compcontroller->wd_get_api( ).
      lr_port_manager = l_component->get_portal_manager( ) .
    * The value inserted into the navigation-target field can be found in the Portal
    * content administration tab of your portal. It is the ID or PCD Location field
      wa_navigation-target = pcd. " Please provide the PCD Location of the WDJ Application here.
      wa_navigation-mode   = '0'.  "0 = INTERNAL(same page) and 1 = EXTERNAL(new page).
      CALL METHOD lr_port_manager->navigate_absolute
        EXPORTING
          navigation_target = wa_navigation-target
          navigation_mode   = wa_navigation-mode.
    You can get the PCD from the Page properties of the WDJ application page in the Portal.
    Hope it helps!
    Warm regards,
    Upendra Agrawal

  • Need Help: Using Ref Cursor in ProC to call a function within a Package

    I'm calling a function within a package that is returning a REF CURSOR.
    As per the Oracle Pro*C Programmer's Guide, I did the following:
    1) declared my cursor with a: EXEC SQL BEGIN DECLARE SECTION and declared the cursor as: SQL_CURSOR my_cursor;
    2) I allocated the cursor as: EXEC SQL ALLOCATE :my_cursor;
    3) Via a EXEC SQL.....END-EXEC begin block
    I called the package function and assign the return value to my cursor
    e.g. my_cursor := package.function(:host1, :host2);
    Now, the only difference between my code and the example given in the Pro*C Programmer's Guide is that the example calls a PROCEDURE within a package that passes back the REF CURSOR as an OUT host variable.
    Whereas, since I am calling a function, the function ASSIGNS the return REF CURSOR in the return value.
    If I say my_cursor := package.function(:host1, :host2); I get a message stating, "PLS-00201: identifier MY_CURSOR" must be declared"
    If I say :my_cursor := package.function(:host1, :host2); I get a message stating, "ORA-01480: trailing null missing from STR bind value"
    I just want to call a package function and assign the return value to a REF CURSOR variable. There must be a way of doing this. I can do this easily in standard PL/SQL. How can this be done in Pro*C ???
    Thanks for any help.

    Folks, I figured it out. For those who may face this problem in the future you may want to take note for future reference.
    Oracle does not allow you to assign the return value of a REF CURSOR from a FUNCTION ( not Procedure - - there is a difference) directly to a host variable. This is the case even if that host variable is declared a CURSOR variable.
    The trick is as follows: Declare the REF CURSOR within the PL/SQL BEGIN Block, using the TYPE statement, that will contain the call to the package function. On the call, you then assign the return REF CURSOR value that the function is returning to your REF CURSOR variable declared in the DECLARE section of the EXEC SQL .... END-EXEC PL/SQL Block.
    THEN, assign the REF CURSOR variable that was populated from the function call to your HOST cursor varaible. Then fetch this HOST Cursor variable into your Host record structure variable. Then you can deference individual fields as need be within your C or C++ code.
    I hope this will help someone facing a deadline crunch. Happy computing !

  • Problem with accepting the Ref Cursor in c# program

    I am passing an argument as OUT Ref Cursor in a stored procedure. and calling the procedure from my c# program.
    I can connect the database successfully but am getting the error on calling the procedure.
    I am using the ODBC connection
    My procedure's signatures are like:
    CREATE OR REPLACE PACKAGE BODY packageName
    IS
    PROCEDURE GetOutput(returnCursor OUT Sys_RefCursor)
    AS
    BEGIN
    OPEN returnCursor FOR
    <<my select statement>>
    END GetOutput;
    END packageName;
    My function call is like:
    CString Extract::ExtractScript() const
         CString script;
         script.Format("{Call %s.%s()}", packageName,GetOutput);
         return script;
    I can compile the procedure successfully on Toad but while calling the procedure from the C# program it gives following error
    Connection Successful
    Problem executing SQL {Call packageName.GetOutput()}...
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'GetOutput'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Message was edited by:
    user653288

    Hi Aga,
    Thanks for your response.
    I figured out the problem.
    I was using the ODBC connection which wasnt updated for Oracle 10g.
    I have updated that. Now its working fine.
    Thanks again
    Regards

  • XSQL ERROR with bind-params in ref-cursor-function

    Hi Steve
    I always get the error
    ORA-01006 bind variable does not exist
    when using a bind variable in a <xsql:ref-cursor-function> action element.
    when I replace the bind variable with a @ - parameter substitution, all works fine.
    My configuration:
    XSQL 1.0.4.1 on Win200Pro ,Apache + Jserv + DB from ORA 8.1.7 installation
    My Source
    <xsql:ref-cursor-function
    dbconn="ekat"
    eblike="%"
    list="a0"
    bind-params="eblike"
    include-schema="no"
    null-indicator="no"
    id-attribute=""
    fetch-size="500"
    >
    {@dbconn}o.ekatkategcv.open_cv_ebh ('{@list}', :1)
    </xsql:ref-cursor-function>
    ( dbconn selects my schema, not changed often, which contains package ekatkategcv with
    function open_cv_ebh returning a cursor)
    Any fix would be appreciated to avoid reparsing on each call.
    BTW, is it right, that a ref-cursor funtion is reparsed whenever the content of
    a parameter used with @ changes?
    Best regards
    H.Buschmann ([email protected])
    null

    I have tried it using ? instead of :1, this method works fine.
    I haven't tried the name method (:bindvar) yet.
    Until now, I only used xsl:query and xsql:ref-cursor-function, so I didn't check
    the other action handlers with bind variables like :1
    null

  • I am have problems with the ipad mini, it is a little crazy. It controls by itself, opens and closes application zooms in and out, end my facetime calls, Also Un certain part of the screen is no longer responsive to the touch.

    I am have problems with the ipad mini, it is a little crazy. It controls by itself, opens and closes application zooms in and out, end my facetime calls, Also Un certain part of the screen is no longer responsive to the touch, it Should be having so much problems. Thanks for your help.
    iPad, iOS 7.0.4

    Try reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

Maybe you are looking for

  • Problem creating unit testing repository (and workaround)

    I tried to create the unit testing repository with a user that had all the required system privileges granted through a different role other than RESOURCE and CONNECT roles, and who wasn't explicitely granted CREATE VIEW, but inherited it through the

  • To Send POST Method Value in ProxyServer

    Hello I developed a ProxyServer. Problem is when i send post method value to server...data is not sending correctly. But i can get the value correctly form browser. How can send the post method values. My source code is * ServerThread.java * Created

  • Where are output module presets physically stored?

    I have a broken XP installation that is not fixable but the drive is accesible from my other Windows installation. Before I broke XP I deactivated my CS3 and now I have it installed and activated in Windows 7. Now I am really missing all my output mo

  • Issue with Shared Objects

    Hi all, I've a problem with a program working on Shared Objects technology. We have a Job, scheduled in 18 parallelism, and each one writes into the SHM controlled by a SHMA Class. At jobs ending, a program reads content from the area and sends an au

  • Pagination for Master Form, Detail Table

    Hi, I am using JDev11.1.2.1.0 I am creating a page having master detail relationship (master as a form and detail as a table). On click of First, Prev, Next, Last pagination button of master should change the data and refresh child table data. So cre