Dynamic Output parameters count

Hi All,
I have a requirement in which the number of output cursors from a procedure depends on the input parameter.
That is for a input parameters value A & B, I have to throw out two resultset and for A & C, I have to throw out 5 resultset. I have more than 10 such combinations.
Is it possible to do that by any means?
BTW I am in oracle 9i.
Thanks in Advance,
Subbu S.

That is for a input parameters value A & B, I have to
throw out two resultset and for A & C, I have to
throw out 5 resultset. I have more than 10 such
combinations.Is there a logic to selecting the number of output resultsets? Or is it hard-coded that if it is A & B, then you have to throw out 2 resultsets, etc.?
Do you have any sample code that we could see?
Thanks

Similar Messages

  • Output parameters always return null when ExecuteNonQuery - No RefCursor

    I am trying to call a procedure through ODP that passes in one input parameter and returns two (non-RefCursor) VARCHAR2 output parameters. I am calling the procedure using ExecuteNonQuery(); however, my parameters always return null. When I run the procedure outside of ODP, such as with SQLPlus or SQL Navigator, the output parameters are populated correctly. For some reason, there appears to be a disconnect inside of ODP. Is there a way to resolve this?
    Anyone have this problem?
    Here is the basic code:
    ===========================================================
    //     External call of the class below
    DBNonCursorParameterTest Tester = new DBNonCursorParameterTest();
    ===========================================================
    //     The class and constructor that calls the procedure and prints the results.
    public class DBNonCursorParameterTest
         public DBNonCursorParameterTest()
              //     The test procedure I used is a procedure that takes a recordID (Int32) and then returns a
              //     general Name (Varchar2) and a Legal Name (Varchar2) from one table with those three fields.
              string strProcName                    = "MyTestProc;
              OracleConnection conn               = new OracleConnection(DBConnection.ConnectionString);
              OracleCommand cmd                    = new OracleCommand(strProcName,conn);
              cmd.CommandType                         = CommandType.StoredProcedure;
                   //     Create the input parameter and the output cursor parameter to retrieve data; assign a value to the input parameter;
              //     then create the parameter collection and add the parameters.
              OracleParameter pBPID               = new OracleParameter("p_bpid",               OracleDbType.Int32,          ParameterDirection.Input);
              OracleParameter pBPName               = new OracleParameter("p_Name",               OracleDbType.Varchar2,     ParameterDirection.Output);
              OracleParameter pBPLegalName     = new OracleParameter("p_LegalName",     OracleDbType.Varchar2,     ParameterDirection.Output);
              pBPID.Value = 1;
              //     Open connection and run stored procedure.
              try
                   conn.Open();
                   cmd.Parameters.Add(pBPID);
                   cmd.Parameters.Add(pBPName);
                   cmd.Parameters.Add(pBPLegalName);
                   cmd.ExecuteNonQuery();
                   Console.Write("\n" + cmd.CommandText + "\n\n");
                   //for (int i = 0; i < cmd.Parameters.Count; i++)
                   // Console.WriteLine("Parameter: " + cmd.Parameters.ParameterName + " Direction = "     + cmd.Parameters[i].Direction.ToString());
                   // Console.WriteLine("Parameter: " + cmd.Parameters[i].ParameterName + " Status = "          + cmd.Parameters[i].Status.ToString());
                   // Console.WriteLine("Parameter: " + cmd.Parameters[i].ParameterName + " Value = "          + cmd.Parameters[i].Value.ToString() + "\n");
                   foreach (OracleParameter orap in cmd.Parameters)
                        Console.WriteLine("Parameter: " + orap.ParameterName + " Direction = "     + orap.Direction.ToString() + " Value = " + orap.Value.ToString());
                        Console.WriteLine("Parameter: " + orap.ParameterName + " Status = "          + orap.Status.ToString());
                        Console.WriteLine("Parameter: " + orap.ParameterName + " Value = "          + orap.Value.ToString() + "\n");
                   //     End Test code.
              catch (Exception ex)
                   throw new Exception("ExecuteQuery() failed: " + ex.Message);
              finally
                   this.Close();
         public void Close()
              if (conn.State != ConnectionState.Closed)
                   conn.Close();
    =========================================================
    Other things to note:
    I have no problems with returning RefCursors; they work fine. I just don't want to use RefCursors when they are not efficient, and I want to have the ability to return output parameters when I only want to return single values and/or a value from an insert/update/delete.
    Thanks for any help you can provide.

    Hello,
    Here's a short test using multiple out parameters and a stored procedure. Does this work as expected in your environment?
    Database:
    /* simple procedure to return multiple out parameters */
    create or replace procedure out_test (p_text in varchar2,
                                          p_upper out varchar2,
                                          p_initcap out varchar2)
    as
    begin
      select upper(p_text) into p_upper from dual;
      select initcap(p_text) into p_initcap from dual;
    end;
    /C# source:
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace Miscellaneous
      class Program
        static void Main(string[] args)
          // change connection string as appropriate
          const string constr = "User Id=orademo; " +
                                "Password=oracle; " +
                                "Data Source=orademo; " +
                                "Enlist=false; " +
                                "Pooling=false";
          // the stored procedure to execute
          const string sql = "out_test";
          // simple input parameter for the stored procedure
          string text = "hello!";
          // create and open connection
          OracleConnection con = new OracleConnection(constr);
          con.Open();
          // create and setup connection object
          OracleCommand cmd = con.CreateCommand();
          cmd.CommandText = sql;
          cmd.CommandType = CommandType.StoredProcedure;
          // the input paramater
          OracleParameter p_text = new OracleParameter("p_text",
                                                       OracleDbType.Varchar2,
                                                       text.Length,
                                                       text,
                                                       ParameterDirection.Input);
          // first output parameter
          OracleParameter p_upper = new OracleParameter("p_upper",
                                                        OracleDbType.Varchar2,
                                                        text.Length,
                                                        null,
                                                        ParameterDirection.Output);
          // second output parameter
          OracleParameter p_initcap = new OracleParameter("p_initcap",
                                                          OracleDbType.Varchar2,
                                                          text.Length,
                                                          null,
                                                          ParameterDirection.Output);
          // add parameters to collection
          cmd.Parameters.Add(p_text);
          cmd.Parameters.Add(p_upper);
          cmd.Parameters.Add(p_initcap);
          // execute the stored procedure
          cmd.ExecuteNonQuery();
          // write results to console
          Console.WriteLine("   p_text = {0}", text);
          Console.WriteLine("  p_upper = {0}", p_upper.Value.ToString());
          Console.WriteLine("p_initcap = {0}", p_initcap.Value.ToString());
          Console.WriteLine();
          // keep console from closing when run in debug mode from IDE
          Console.WriteLine("ENTER to continue...");
          Console.ReadLine();
    }Output:
       p_text = hello!
      p_upper = HELLO!
    p_initcap = Hello!
    ENTER to continue...- Mark

  • Can you get values back from a stored procedure via OUTPUT parameters?

    Can you get values back from calling a stored procedure via OUTPUT parameters/variables? I call the SP via a SQL statement from a script either in a WF or DF.
    I thought I read some reference that DI could not get the values from OUTPUT parameters but I could not find it again (don't know if it is in any of the documentation or referred to in a forum.
    I did try a couple of tests but it did not reutrn any values via OUTPUT. But before I give up I thought I'd see if you could and maybe I needed to change something.

    This isn't exactly an answer to your question, but I'll point out that, given that you're resorting to a SQL script in the first place, there's no reason you can't also turn the output parameters into a regular result or record set. (The following uses T-SQL, although I think it's pretty generic.)
    declare @param1 int, param2 varchar(100), @return int;
    exec @return = proc @param1 = @param1 output, @param2 = @param2 output;
    select @param1 as param1, @param2 as param2;
    That is, to get from output parameters to a "regular" output from the SQL script isn't much of a leap...
    Jeff Prenevost
    BI Consultant
    Ann Arbor, MI

  • How to allow multiple output parameters in a user-defined service operation???

    I have creating a self-defined service operation “LDAPAddUser” to connect to LDAP server to create user accounts. I want to get 2 output parameters after executing the operation. One is the result (Boolean data type) and one is the error message (String data type). However, since Java only support one return value in a method, it seems that only one output parameter can be returned. May I have the suggestion so that multiple parameters can be supported in this case? Here is the extracted code
    In Java program,
    public Boolean addUser(String url, String aName)
    In file "component.xml",
         <operation name="addUser" method="addUser" orchestrateable="true" anonymous-access="true">
      <hint>Add a new user</hint>
         <input-parameter name="url" type="java.lang.String" required="true" title="LDAP URL">
         </input-parameter>
              <input-parameter name="aName" type="java.lang.String" required="true" title="Admin Login Name">
         </input-parameter>
              <output-parameter name="Result" title="Result" type="java.lang.Boolean">
              </output-parameter>
    Besides the boolean return value, I want to get another return value (string data type). Any suggestion ?

    I've returned multiple values to LiveCycle by using a complex object as an intermediatory.
    For example if I need to return two strings (firstName and lastName), I'll first build a single class (name) with two string attributes (private String firstName; private String LastName) and add getters and setters to my "name" class for each.  My service class method will return an object of type "name".
    for example  public name mymethod(String GUID, String username, String password).......
    Then in the component.xml you can return the two strings as long as you use the binding type "Bean":
    <output-parameter name="firstName" title="First Name" binding-type="Bean" property="firstName">
                        </output-parameter>
    <output-parameter name="lastName" title="Last Name" binding-type="Bean" property="lastName">
                         </output-parameter>

  • How to reduce number of output parameters in case of determination engine API

    Hi
    We are using determination engine API to integrate with the third party (OBRM) . In that case all the base/top/intermediate attributes have been sent in xml as output.
    Is there any way to filter out the output parameters as I don't want to send all attributes in output XML.
    Thanks and Regards
    Vandana

    There are the following possible copies of an object that can be made in TopLink.
    - Session cache - copy of object stored in the Session cache, this instance is considered read-only and can be shared. In the case of a shared cache, this copy exists in the ServerSession cache, in the case of an isolated cache, this copy exists in the ClientSession cache.
    This copy can be created whenever a query is executed against a ClientSession, or non-isolated UnitOfWork. To avoid this copy for an update operation, you can query in a UnitOfWork, and set your descriptor's unitOfWorkCacheIsolationLevel to ISOLATE_CACHE_ALWAYS (added in 10.1.3).
    This copy can be created after a inserted object is committed as well. ISOLATE_CACHE_ALWAYS will also avoid this.
    - UnitOfWork working copy. Instance of the object that is modified in the UnitOfWork. This instance must exist as at least one instance is required, unless UpdateAll / DeleteAll / SQL queries are used.
    - UnitOfWork backup copy. This copy is used to track changes to the object. This copy can be avoided if attribute change tracking is used (added in 10.1.3, weaving added in 11g).
    So, it is possible to only have a single copy.
    You can also use a DatabaseSession which only maintains a single copy. You can use Insert and UpdateObjectQuery's, these will update everything and not give you the benefit of change tracking nor a shared cache, but may be useful in batch transactions such as yours.
    -- James : http://www.eclipselink.org

  • Report painter -output parameters,Data source,Extract parameter, report

    Hi expert,
    1)What report painter -output parameters,Data source,Extract parameter, report mean for and what are the difference?
    2)I have create new report painter and transport to  Test server using T-code:GCTR and I find that the T-code always point to old report. As I had check the SE93 the D_SREPOVARI-REPORT is point to report group.Why this happen?
    3) Does creation of new report or modification of the report always need to select the extraction option so that it will able to display the relected changes? Because, I have done modification on the report but it is not reflected the changes even i save until i have to create the extraction is able to display the report but every time i run the report need to select the extraction with option to choose new extract or old. Kindly advice how to save and create the report painter and save will display reflected result .
    Please help

    Hi BR Christian,
    Thank you for the prompt reply.
    I have few querys as below:
    1)Do we every time create new report by copying the existing report painter need to select output parameter, data source and extract parameter in order to be able to display the new report?
    2)when modify existing report painter and save it do we need to select output parameter, data source and extract parameter in order to be able to display the modify report correctly?
    3) What are the different between right click copy the report inreport painter compare with create report painter with copy GRR1?
    4) What are the T-code for modify the report group?
    5) When I create a new report with the right click copy in GRR1 and modify the report painter column only and everything remain the same just the report name different why when execute the report it always appear in the selection screen with report button which have option button to select the 2 version  of report which one is the destination report that I copy from and one is the new report? How to set the report when execute will only display the new report only without need to select the option with just new report only?
    6)For transferring reports you can use GR37 (export) and GR38 (import) can be use to transport from one client to another client? What is difference between GR37 compare with  GCTR?
    7) If I use GR37 and GR38 it is mean no need to create the transport request which as usual we create transport se10?
    we can directly import to another client ussing GR38?
    8)When we create a new report with copy with the existing report with just modify the report colunm and the report name difference only what are the setting example: report,report group need to be selected to be include to export/transport to another client?
    9) What are the difference between library and report group?
    10) Can we set Se93 to execute only report not report group? How?
    11) when using GR37 to transport it is also include the report group,library and the particular report?
    12) Can I include the variable in the column header to display fiscal year which I have selected from the selection screen?
    How and which variable should i use?
    please help.
    many thanks
    Edited by: KH on Jun 18, 2011 6:52 AM
    Edited by: KH on Jun 18, 2011 6:55 AM
    Edited by: KH on Jun 18, 2011 7:06 AM

  • How to view multiple output parameters from web services

    I have used the Labview tool to create a .NET assembly from a WSDL file.
    In the WSDL file the service has been defined to return 2 output parameters.
    In Labview, when I invoke the method for this service the first output parameter ends up as the return value of the method.  I can create an indicator for this and it gets updated properly when I run the VIS to use the web service..  The indicator is an integer value but recognizes the type defined within the WSDL file. 
    The second output parameter shows up as an output value.  When I right click on it and create an indicator for it I get a .NET icon on the front panel rather than an integer value. 
    How can I view the value for this second output parameter after running the web service?
    Is there a difference in how multiple output parameters handled in newer versions of Labview (I am using verison 7.1)?

    scrooge wrote:
    You can try this link .
    the link is dead... or i dont have access..

  • How to call a (catalog) stored procedure directly in a xsodata file with in/output parameters

    I am new to XS but i managed to enable a table through xsodata:
    service namespace "sap.hana.democontent.epm" { 
      "AA465342"."TMP_HENK" as "TMP_HENK"; 
    But now i am looking for code that can call a stored procedure that has 2 input- and 3 output parameters.... who can help me out with this?

    Hi Vivek, thanks for the quick response!
    I already found that blog, but it does not completely answer my question. i am struggling to get my content procedure working. call the R (catalog) stored procedure:
    the code
    /********* Begin Procedure Script ************/
    BEGIN
        call "AA465342"."MO_PP_SENTIMENT"(SP_IN,SP_OUT) with overview;
    END;
    /********* End Procedure Script ************/
    where it goes wrong:
    : Only table variable is allowed in input parameter in a nested call
    I have defined SP_IN and SP_OUT....
    Can someone give me a clue what i have to change?

  • Mapping display only item to three output parameters from a procedure?

    Hi all
    I have a procedure with three output parameters, which I would like to map the three output parameters to three display only items on the page.
    there is a page process called the procedure, which output statement1,statement2,statement3 parameters.
    I have three items on the page which I would like to map them to the three parameters respectively,
    how can I achieve this?
    thanks

    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

  • Calling a stored procedures and using its output parameters in a report

    Hi,,
    I have a procedure defined in a package on the database. This procedure returns a number of output parameters. How do I call this procedure and use the output parameters in my report ?
    Thanks, Mark

    Depends on the level at which the procedure has to be called. If its at report-level, call the Form in the BEFORE-REPORT-trigger (or AFTER-PARAMFORM) and store the out-values in Placeholder-columns. These you can use anywhere in your report.

  • Dynamic Cascading Parameters - cannot select/enter parameter value

    I am rather new working with Crystal Reports and am having problems with Dynamic Cascading Parameters.
    I am using CR 2008 SP2, Version 12.2.0.290.  Data is from SQL server.
    I have a report to print labels for parts in an order.  I want to be able to enter the ShipTo ID then the contract number.  From there I would like a list of the parts on the contract and be able to select multiple parts to print labels for.
    I right clicked on Parameter Fields and chose New.  I named it ShipToContractPartNo, Type String, List of Values=Dynamic. 
    I added the values as follows:
    ShipToID - Editable, Allow Multiple=False, Allow Discrete=True (cannot be changed), Allow Range=False
    ...ContractNo - Allow Multiple=False, Allow Discrete=True (cannot be changed), Allow Range=False
    ... ...CustPartNo - Allow Multiple=True Allow Discrete=True (cannot be changed), Allow Range=False
    I added the Customer Part parameter to the label.
    When I test the label the parameter Enter Values window looks good but the drop down for Enter ShipToID does not have any ShipTo ID's to choose from and I cannot enter a value, therefore I cannot continue.  I also do not have a Cancel button and always have to end through Task Manager but that's probably a different, unrelated issue.
    I have tried this with and without entering Select Expert records.
    Could someone please tell me if I have missed a step or if there is a known issue?  I searched this site, I looked in CR Help, I referred to the book I have and I googled but have not found this speciic issue.
    Thanks in advance for your assistance.  Let me know if additional information is necessary.
    Jan

    OK.  I have rejoined/relinked all my tablesas follows (with abbreviated names for ease of reading). The actual SQL is at the end.
    ..Job_Hdr JOINED to Job_Shipto
    .....Job_Shipto JOINED to Job_Line
    ........Job_Line JOINED to Job_Bin
    ............Job_Line JOINED to Inv_Mast
    When I create a Dynamic Cascading Parameter prompt on just ContractNo (parent - from table Job_Hdr) and ShipTo (child - from table Job_ShipTo) then it gives me list of Contracts to select from and then a list of ShipTo's for that Contract to select from.  I place them in the Report Header.  I do not add them to the Select Expert.  This works great.
    Now I need to be able to select the parts necessary from the Contract/ShipTo.  When I try to create a Dynamic Cascading Parameter with ContractNo and ShipTo (set up the same as above)  and add in ContractPartNumber (from table Job_Bin) to the parameter then my ContractNo and ShipTo parameters no longer work.  It gives me only 1 contract number to choose from, which isn't the one I want.
    I have tried so many different things and I cannot get the parameters to work when I try to add PartNo into the parameters.
    Any suggestions now?
    Jan
    SELECT "p21_view_inv_mast"."item_desc", "p21_view_job_price_line"."customer_part_no", "p21_view_job_price_hdr"."contract_no", "p21_view_job_price_bin"."min_qty", "p21_view_job_price_bin"."reorder_qty", "p21_view_job_price_bin"."line_station", "p21_view_job_price_line"."row_status_flag", "p21_view_job_price_bin"."line_feed", "p21_view_job_price_bin"."row_status_flag", "p21_view_job_price_bin"."contract_bin_id"
    FROM   ((("Prophet21"."dbo"."p21_view_job_price_hdr" "p21_view_job_price_hdr"
    INNER JOIN "Prophet21"."dbo"."p21_view_job_price_customer_shipto" "p21_view_job_price_customer_shipto" ON "p21_view_job_price_hdr"."job_price_hdr_uid"="p21_view_job_price_customer_shipto"."job_price_hdr_uid")
    INNER JOIN "Prophet21"."dbo"."p21_view_job_price_line" "p21_view_job_price_line" ON "p21_view_job_price_customer_shipto"."job_price_hdr_uid"="p21_view_job_price_line"."job_price_hdr_uid")
    INNER JOIN "Prophet21"."dbo"."p21_view_job_price_bin" "p21_view_job_price_bin" ON ("p21_view_job_price_customer_shipto"."ship_to_id"="p21_view_job_price_bin"."ship_to_id") AND ("p21_view_job_price_line"."job_price_line_uid"="p21_view_job_price_bin"."job_price_line_uid"))
    INNER JOIN "Prophet21"."dbo"."p21_view_inv_mast" "p21_view_inv_mast" ON "p21_view_job_price_line"."inv_mast_uid"="p21_view_inv_mast"."inv_mast_uid"
    WHERE  "p21_view_job_price_bin"."row_status_flag"=704 AND "p21_view_job_price_line"."row_status_flag"=704
    ORDER BY "p21_view_job_price_bin"."line_feed", "p21_view_job_price_bin"."line_station"

  • Function module to list out a report's input/output parameters

    Hi experts,
    I'd like to know if there is a function module which can list out all the input and output parameters (variables, tables, etc.) by giving the report name as input.
    If not, please suggest a way to find out the input/output parameters.
    Regards,
    Ancy

    Well, they're not input/output parameters, and really you shouldn't refer to them as such.  A variable is simple what it says - a variable.  You could, I suppose, refer to data sources.  But then, the report could be getting data from a set of function modules.
    So my assumption is correct, you are talking about a where-used list.
    >Check out tables like CROSS. To find other useful tables, put an SQL trace on, do the where used, and see what tables are hit.
    matt

  • Data template and procedure output parameters

    Hi all,
    I have multiple sql statements and a MSSQL procedure witch I have to call when generating a report.
    Therefore I use a data template.
    The MSSQL procedure I call with EXEC. It returns the table that it sould return and everything is fine.
    Except: the procedure also returns a punch of OUTPUT parameters and I don't know how to catch those parameters in my data template.
    I have declared all these parameters in the BIP and also in the data template, but there are no values for them when I execute the report.
    Here is a my current data template:
    <dataTemplate name="NameOfTemplate">
    <properties>
      <property name="include_parameters" value="true"/>
    </properties>
    <parameters>
         <parameter name="clientID" dataType="character"/>
         <parameter name="dept" dataType="number" /> <!--This is for MSSQL output-->
         <parameter name="forpay" dataType="number"/> <!--This is for MSSQL output-->
        <parameter name="name" dataType="character"/> <!--This is for MSSQL output-->
    </parameters>
    <dataQuery>
         <sqlStatement name="ARVE" dataSourceRef="connection1">
              <![CDATA[
              select
              from
                   OAP.ACCOUNTS
              where
                   ACCOUNTS.CLIENT_CODE = :clientID
              ]]>
         </sqlStatement>
         <sqlStatement name="ARVE_T" dataSourceRef="connection2" fixedSchema="false">
              <![CDATA[EXEC Dept_proc
                   @ID = :clientID,
                   @Volg =:dept,
                   @Ettemaks =:forpay,
                   @Nimi =:name]]>
        </sqlStatement>
      </dataQuery>
      <dataStructure>
         <group name="ARVE_TULEMUS" source="ARVE">
              <element name="ACCOUNT_SUM" value="SUMMA"/>
         </group>
         <group name="ARVE_TULEMUS" source="ARVE_T">
              <element name="ARVE_NUMBER" value="ARVENUMBER"/>
              <element name="ARVE_KUUPAEV" value="ARVEKUUPAEV"/>
              <element name="ARVE_LEPINGU_SALDO" value="VOLGUSUMMA"/>
         </group>
      </dataStructure>
    </dataTemplate>Where @Volg, @Ettemaks and @Nimi are MSSQL procedure output parameters that I want to show in my report.
    Can anyone give ma an example how to do this?

    Hi all,
    I have multiple sql statements and a MSSQL procedure witch I have to call when generating a report.
    Therefore I use a data template.
    The MSSQL procedure I call with EXEC. It returns the table that it sould return and everything is fine.
    Except: the procedure also returns a punch of OUTPUT parameters and I don't know how to catch those parameters in my data template.
    I have declared all these parameters in the BIP and also in the data template, but there are no values for them when I execute the report.
    Here is a my current data template:
    <dataTemplate name="NameOfTemplate">
    <properties>
      <property name="include_parameters" value="true"/>
    </properties>
    <parameters>
         <parameter name="clientID" dataType="character"/>
         <parameter name="dept" dataType="number" /> <!--This is for MSSQL output-->
         <parameter name="forpay" dataType="number"/> <!--This is for MSSQL output-->
        <parameter name="name" dataType="character"/> <!--This is for MSSQL output-->
    </parameters>
    <dataQuery>
         <sqlStatement name="ARVE" dataSourceRef="connection1">
              <![CDATA[
              select
              from
                   OAP.ACCOUNTS
              where
                   ACCOUNTS.CLIENT_CODE = :clientID
              ]]>
         </sqlStatement>
         <sqlStatement name="ARVE_T" dataSourceRef="connection2" fixedSchema="false">
              <![CDATA[EXEC Dept_proc
                   @ID = :clientID,
                   @Volg =:dept,
                   @Ettemaks =:forpay,
                   @Nimi =:name]]>
        </sqlStatement>
      </dataQuery>
      <dataStructure>
         <group name="ARVE_TULEMUS" source="ARVE">
              <element name="ACCOUNT_SUM" value="SUMMA"/>
         </group>
         <group name="ARVE_TULEMUS" source="ARVE_T">
              <element name="ARVE_NUMBER" value="ARVENUMBER"/>
              <element name="ARVE_KUUPAEV" value="ARVEKUUPAEV"/>
              <element name="ARVE_LEPINGU_SALDO" value="VOLGUSUMMA"/>
         </group>
      </dataStructure>
    </dataTemplate>Where @Volg, @Ettemaks and @Nimi are MSSQL procedure output parameters that I want to show in my report.
    Can anyone give ma an example how to do this?

  • Output parameters or how to return more than one value

    My RMI server retrieves a list of Strings from the database. I need to return a status code int and an array of Strings to the RMI client. Does anybody have any ideas on how to do this. The only way I have come up with is to return an array of Strings using the first array position as the status code. But this is very ugly. There doesn't seem to be any way to have output parameters. I can use "output parameters" with code that lies in the same app by using wrapper classes or arrays but this does not really apply to a client and server running on different machines. Any ideas?

    Well, my general reaction is that you don't need a status code. (You can instead throw an exception if the status is anything but "OK".)
    However, on the assumption that you really DO need the status, then some alternatives are
    o Return an object that has a status code and an array as member variables.
    o In the call, pass in an object that the server can fill in with the array of strings. have the function return the status code.

  • Output Parameters in Java

    Hello All,
    I've been trying to find a way to pass parameters as output as I've done previously in C and in Pascal.
    For example, in C, you can do the following declaration:
    int someMethod(int& num);
    which returns an integer but also outputs another integer called num, which is passed by reference.
    In Pascal, you can do something similar:
    Integer someMethod(out Integer num);
    which does the same thing. Is there any way to do something like this in Java?
    Thanks,
    Anthony Frasso
    [email protected]

    To replicate an "output parameter," simply create a method that's signature is as follows:
    void method(Object inputParameter1...n, Hashtable outputParameters)Use the Hashtable to store and retrieve any output parameters necessary. You must "know" the keys to look the corresponding values up in the Hashtable after executing the method, which may be a bit less than attractive, however.
    An alternative solution is to write a class:
    class OutputParameter {
      Object value;
      void setValue(Object value) {
        this.value = value;
      Object getValue() {
        return value;
    }Then you simply pass an instance of OutputParameter for each output parameter, use setValue() within the method to alter the "return" value, and getValue() from the calling method to return the particular value. The only unattractive aspect of this, obviously, is that a type cast must be made when reading the value (unless dealing with an Object).

Maybe you are looking for

  • Service Requests-Business days when year changes

    Hi All, I am trying to calculate for how long a SR has been open in business days only. I have successfully used Mike Lairson's formula for the last 9 months but it seems it cannot cope with year changes. If the begin data is in 2009 and the end date

  • How do you update the SIM card on your account?

    #1. < Edited for language by Host > I just thought that needed to be said. I had a texting problem with my iPhone and found out after 6 hours on the phone that I needed to get a new SIM card. I went to the store and picked it up. I asked them to help

  • Sending Messages with JavaMail

    I am new to JavaMail, and have a few questions. I am writing a Java application that only needs to send mail via an SMTP server. 1. Do I need the JAF (JavaBeans Activation Framework) if I only want to send mail? 2. I seem to be stuck at instantiating

  • Upgrading at Aperture 3

    I bought my apple computer in January 2010 and let aperture install directly on the hard disk. This is the version aperture 2,1. How could I upgrade this to aperture 3 ?

  • Change time column in iCAL

    Hi: I am a physician, and I organize the schedule for the Docs at my hospital. We have (for example), pediatrician, orthopaedics, internists, etc. For several years, I have used an excel sheet that basically formats as follows: GROUP June 29 June 30