!!! I need to get the return value from a PL/SQL in Java.. How??? !!!

Hi
-- I have a PL/SQL in which it return an array value and I need to get the value using Java.... any idea how?
thanks

Check out CallableStatement:
http://java.sun.com/j2se/1.5.0/docs/api/java/sql/CallableStatement.html

Similar Messages

  • How to get the return values from a web page

    Hi all :
       how to get the return values from a web page ?  I mean how pass values betwen webflow and web page ?
    thank you very much
    Edited by: jingying Sony on Apr 15, 2010 6:15 AM
    Edited by: jingying Sony on Apr 15, 2010 6:18 AM

    Hi,
    What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
    Regards,
    Karri

  • Calling the DTExec from Perl Script and need to get the Return Value (Sucess or Failure)

    I am able to execute the SSIS Package from Perl Script using DTExec. But i need to get the return code of the SSIS Execution. Is their any option available to get the Success or Failure information from Perl ?

    Exit codes returned from dtexec utility             
    When a package runs, dtexec can return an exit code. The exit code is used to populate the ERRORLEVEL variable, the value of which can then be tested in conditional statements or branching logic within a batch file. The following table lists
    the values that the dtexec utility can set when exiting.
    http://technet.microsoft.com/en-us/library/hh231187.aspx
    There's a wrinkle if the package is running in the SSIS Catalog:
    http://www.mattmasson.com/2012/02/exit-codes-dtexec-and-ssis-catalog/
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Remote Object - not able to get the returned value from java method

         Hi ,
    I am developing one sample flex aplication that connects to the java code and displays the returned value from the
    java method in flex client. Here I am able to invoke the java method but not able to collect the returned value.
    lastResult is giving null .  I am able to see the sysout messages in server console.
    I am using flex 3.2 and blazeds server  and java 1.5
    Here is the code what I have written.
    <?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication  xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#FFFFFF" initialize="initApp()">
     <mx:Script><![CDATA[
    import mx.controls.Alert; 
    import mx.binding.utils.ChangeWatcher; 
    import mx.rpc.events.ResultEvent; 
    import mx.messaging.*; 
    import mx.messaging.channels.* 
    public function initApp():void { 
         var cs:ChannelSet = new ChannelSet(); 
         var customChannel:Channel = new AMFChannel("my-amf", "http://localhost:8400/blazeds/messagebroker/amf");     cs.addChannel(customChannel);
         remoteObj.channelSet = cs;
    public function writeToConsole():void {      remoteObj.writeToConsole(
    "hello from Flash client");
          var returnedVal:String = remoteObj.setName().lastResult;     Alert.show(returnedVal);
    //[Bindable] 
    // private var returnedVal:String; 
    ]]>
    </mx:Script>
    <mx:RemoteObject id="remoteObj" destination="sro" /> 
    <mx:Form width="437" height="281">
     <mx:FormItem>  
    </mx:FormItem>  
    <mx:Button label="Write To Server Console" click="writeToConsole()"/>
     </mx:Form>
     </mx:WindowedApplication>
    Java code
    public  
         public SimpleRemoteObject(){  
              super();     }
      class SimpleRemoteObject { 
         public void writeToConsole(String msg) {          System.out.println("SimpleRemoteObject.write: " + msg);     }
         public String setName(){          System.
    out.println("Name changed in Java"); 
              return "Name changed in Java";
    And I have configured destination in  remote-config.xml
    <destination id="sro">
       <properties>    
        <source>SimpleRemoteObject</source>
        <scope>application</scope>
       </properties>
      </destination>
    Please help me .

    You are not able to get the returned value because if you see the Remote object help you will realise you have to use result="resultfn()" and fault = "faultfn()"
    In this you define what you wish to do.
    More importantly in the remote object you need to define which method you wish to call using the method class like this
    <mx:RemoteObject id="remoteObj" destination="sro" result="r1" fault="f1"  >
         <Method name="javaMethodName" result="r2" fault="f2"/>
    <mx:RemoteObject>
    r2 is the function where you get the result back from java and can use it to send the alert.

  • Need to get the selected values from the selectManyShuttle

    Hi,
    I am using ADF11g newer version.
    I have a selectManyShuttle and a command button. Need to insert all the selected values on the right hand side of the selectManyShuttle into a database table.
    I created the selectManyShuttle with the values. Need help in getting the values on the right hand side.
    <af:selectManyShuttle value="#{bindings.UserMgmtVO1.inputValue}"
    id="sms2">
    <f:selectItems value="#{bindings.UserMgmtVO1.items}"
    id="si6"/>
    </af:selectManyShuttle>
    Any sample code or link is really appreicated.
    Thanks

    Thanks for the reply.
    I am using a View Object and I dropped it as SelectManyShuttle
    <af:selectManyShuttle value="#{bindings.UserMgmtVO1.inputValue}"
    id="sms2"
    valueChangeListener="#{POBacking.getSelectedValues}"
    valuePassThru="true"
    autoSubmit="true">
    <f:selectItems value="#{bindings.UserMgmtVO1.items}"
    id="si6"/>
    </af:selectManyShuttle>
    public void getSelectedValues(ValueChangeEvent valueChangeEvent) {
    System.out.println("Testing Shuttle");
    ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
    String val = "";
    String sqlStmt = "";
    try {
    if (list != null) {
    for (int i = 0; i < list.size(); i++) {
    int l = list.size() - 1;
    val = list.get(l).toString(); //returns , delimited string
    System.out.println(" value:" + val);
    if (val != null) {
    val = val.replaceAll("[\\[\\]]", ""); //remove []
    StringTokenizer st = new StringTokenizer(val, ",");
    int nto = st.countTokens();
    for (int j = 0; j < nto; j++) {
    String users = st.nextToken().trim();
    System.out.println("Users:" + users);
    //sqlStmt = " update xxpp_project_clip set clip_status='true', clip_seq = "+j * 10+
    // " where project_id = "+rHdr.getAttribute("ProjectId") +
    // " and clip_name ='"+ clip_Name +"'";
    //System.out.println("sqlStmt:" + sqlStmt);
    //stmt.executeUpdate(sqlStmt);
    //am.getDBTransaction().commit();
    //if (stmt != null)
    // stmt.close();
    // am.getDBTransaction().commit();
    } catch (Exception ex) {
    ex.printStackTrace();
    I don't see the values in the list.
    I gets printed as
    value:[Ljava.lang.Integer;@1b10691
    Users:Ljava.lang.Integer;@1b10691
    how to get the individual values in the list?
    Thanks
    Saru

  • How do I get the return value from an executable?

    I'm running an external executable from dbms_scheduler but how do I get the exit code from the program run or any screen output?

    Hi,
    In the additional_info column of schedulerjob_run_details there should be something like
    job of type EXECUTABLE failed with exit code: Operation not permitted
    "Operation not permitted" is the error code (as translated by the errors header file for that platform).
    In releases 10.2 and up there may also be a line in the additional_info
    STANDARD_ERROR="Error text here"
    This gives the standard error messages output by the application. There is no way to get the standard output of the application.
    Hope this helps,
    Ravi.

  • How to get the returned value from Functions with Callable statement?

    I was glad to find that stored procedures can be invoke with Java class code by the object of Callable statement like :
    String stmt = "BEGIN departments_pkg.do_select(?,?,?); END;";
    and getting the output variables by
    populateAttribute(DEPARTMENTNAME,st.getString(2),true,false);
    But i would like to get values returned from FUNCTION other than stored procedure, how can i achieve it? Thanks a lot!

    Here is  my code
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_1202.
      MODULE subscreen_find.
      CALL SUBSCREEN SUBSEARCH INCLUDING sy-cprog dynnr.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_1202.
      CALL SUBSCREEN SUBSEARCH.
    MODULE subscreen_find.
      case sy-ucomm.
        when 'SELECTED'.             "fcode
          case 'ZSKILL_SEARCH'.     "data element
            when '01'.                       " value range
              dynnr = 0110.
            when '02'.
              dynnr = 0111.
          endcase.
      endcase.
    ENDMODULE.
    kindly tell me what is wrong
    Edited by: Raji Thomas on Feb 8, 2010 10:20 AM

  • LiveCycle DS , can't get the return value of fill( arg) from Assembler class

    Hi all!
    I'm a have small problem , can any one help me? Please
    I make a project which very similar to Product project(in
    example).
    1) Have Assembler class: I work correctly
    package flex.samples.stock;
    import java.util.List;
    import java.util.Collection;
    import java.util.Map;
    import flex.data.DataSyncException;
    import flex.data.assemblers.AbstractAssembler;
    public class StockAssembler extends AbstractAssembler {
    public Collection fill(List fillArgs) {
    StockService service = new StockService();
    System.out.print(fillArgs.size());
    return service.getStocks();
    public Object getItem(Map identity) {
    StockService service = new StockService();
    return service.getStock(((Integer)
    identity.get("StockId")).intValue());
    public void createItem(Object item) {
    StockService service = new StockService();
    service.create((Stock) item);
    public void updateItem(Object newVersion, Object
    prevVersion, List changes) {
    StockService service = new StockService();
    boolean success = service.update((Stock) newVersion);
    if (!success) {
    int stockId = ((Stock) newVersion).getStockId();
    throw new DataSyncException(service.getStock(stockId),
    changes);
    public void deleteItem(Object item) {
    StockService service = new StockService();
    boolean success = service.delete((Stock) item);
    if (!success) {
    int stockId = ((Stock) item).getStockId();
    throw new DataSyncException(service.getStock(stockId),
    null);
    some require class is ok.
    2) I configure in data-management-config.xml
    <destination id="stockinventory">
    <adapter ref="java-dao" />
    <properties>
    <source>flex.samples.stock.StockAssembler</source>
    <scope>application</scope>
    <metadata>
    <identity property="StockId"/>
    </metadata>
    <network>
    <session-timeout>20</session-timeout>
    <paging enabled="false" pageSize="10" />
    <throttle-inbound policy="ERROR" max-frequency="500"/>
    <throttle-outbound policy="REPLACE"
    max-frequency="500"/>
    </network>
    </properties>
    </destination>
    3) My client app:
    I use :
    <mx:ArrayCollection id="stocks"/>
    <mx:DataService id="ds" destination="stockinventory"/>
    ds.fill(stocks); --> Problem here
    When I run this app, The StockAssembler on the server work
    correctly (i use printout to debug) . But variable stocks can't get
    the return value,it is a empty list.
    Please help me!

    Hi,                                                             
    The executeQueryAsync method is “asynchronous, which means that the code will continue to be executed without waiting for the server to
    respond”.
    From the error message “The collection has not been initialized”, which suggests that the object in use hadn’t been initialized after the execution of the executeQueryAsync method.
    I suggest you debug the code in browser to see which line of code will throw this error, then you can reorganize the logic of the code to avoid using the uninitialized object.
    A documentation from MSDN about Using the F12 Developer Tools to Debug JavaScript Errors
    for your reference:
    http://msdn.microsoft.com/en-us/library/ie/gg699336(v=vs.85).aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to Sort by the length of the returned value from a query.

    Hi,
    I was wondering if it is possible to sort by the length of the returned value from a query?
    For example if I want to get a list of people with the name 'Samuel', I would like to short by how short the length of the whole name is.
    Sort by length of the name in SQL
    Samuel Syda
    Samuel Indranaka
    Samuel Johnsons
    Samuel Longhenderson
    Thank you.

    Hi,
    Sorting is done by an ORDER BY clause at the end of the main query.
    In most cases, you can ORDER BY any expression, even f it is not in the SELECT clause.  In this case, it sounds like you just need:
    ORDER BY  LENGTH (name_column)
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Post your query, using an ORDER BY clause like the one above, and point out where that query is producing the wrong results, and explain, using specific examples, how you get the right results from the given data in those places.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Get the Cookie Value from Different Application Servers

    Hi All,
    I am using the two applications with different application servers. How to get the cookie values from one to another application. Shall i know any sample codes?
    Thanks
    Maalan

    A cookie carries a domain name. The browser will only return cookies whose domain matches to domain to which the request is made, however although you can use a partial domain name providing it's not too generic. So, when you add a cookie you need to explicitly set the domain name on the cookie to, for example, your company suffix like ".acme.com", then the cookie should be returned to all the servers under that domain e.g. server1.acme.com and server2.acme.com.

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • How to get the Node Value from XmlValue result?

    Hi ,
    I am not able to get the Node Value from the result. In my XQuery im selecting till a Node, if i change my query as
    collection('PhoneBook')/phone_book/contact_person/address/string()", qc);
    im getting the node value, but here the problem is its not a Node so i cannot get the Node name.
    So how can i get the Node Name and Node value together?
    any help please ????
    XML :
    <?xml version="1.0" encoding="UTF-8"?>
    <phone_book>
    <contact_person>
    <name>
    <first_name>Michael</first_name>
    <second_name>Harrison</second_name>
    </name>
    <address city="yyyyy" pincode="600017" state="xxxxx">
    176 Ganesan street, Janakinagar, alwarthirunagar
    </address>
    </contact_person>
    <phone_number type="mobile">9881952233</phone_number>
    <phone_number type="home">044-24861311</phone_number>
    <phone_number type="office">080-12651174</phone_number>
    </phone_book>
    Code:
    XmlQueryContext qc = manager.createQueryContext();
    XmlResults rs = manager.query
    ("collection('PhoneBook')/phone_book/contact_person/address", qc);
    while(rs.hasNext()){
    XmlValue val = rs.next();
    System.out.println(val.getNodeName() + " = [ " + val.getNodeValue() + " ] ");
    Output
    address = [  ]

    You are right, this seemed un-intuitive to me too, but I finally understood how it's done.
    The "value" of a node is actually the total amount of text that is not contained in any of the node's child nodes (if any). So a node with child nodes can still have text value.
    To get the 'value' of an element node, you must therefore concatenate the values of all children of type "XmlValue::TEXT_NODE", of that node. Try it.
    In your example, the <address> node has no child elements, my guess is that BDB XML stores the address string "176 Ganesan street, Janakinagar, alwarthirunagar" inside a child node of <address> node (of type XmlValue::TEXT_NODE) because you wrote the string on a separate line.

  • Select_list_from_lov, cant get the returning value

    Hi
    I try to use a apex_item.select_list_from_lov in a wizard. The LOV that I have is a dynamic list.
    everything works fine, only I cant get the return value of the selected items.
    multi select list
    htp.p(apex_item.SELECT_LIST_FROM_LOV
    ( 2,
    'MOS_ROL_OMSCHRIJVING',
    ' MULTIPLE HEIGHT=5',
    'NO',
    null,
    null,
    null,
    null,
    'NO')
    trying to see what the return values are, but got nothing.
    :p12_test := :f02;
    (p12_test is a textfield)
    any assistance would be greatly appreciated.
    Thanks
    using apex 4.0.

    >
    trying to see what the return values are, but got nothing.
    :p12_test := :f02;
    (p12_test is a textfield)
    >
    f02 is an associative array. See Referencing Arrays in the APEX API Reference for information on how to access values of items created using apex_item methods.

  • Not getting the return value of a program though it has no  errors

    public static String giroReturnFileDate(String strType)throws IOException{
              try{
                   SimpleDateFormat getFormatDate = new SimpleDateFormat("yyMM");
                   Date date = new Date();
                   String str = getFormatDate.format(date);
                   System.out.println("Current Date is : "+ str);
                   System.out.println("Fetching the Giro file now");
                   if(strType.equalsIgnoreCase("WPD") || strType.equalsIgnoreCase("ISTD")) {
                   FileReader inputFileReader = new FileReader("giro2itcs_"+strType+".txt");
                   ArrayList list = new ArrayList();
                   ArrayList list1 = new ArrayList();
                   System.out.println("Reading the file");
                   BufferedReader inputStream = new BufferedReader(inputFileReader);
                   String inLine = null;
                   String str1 = null;
                   while((inLine = inputStream.readLine()) != null && inLine.length() < 2)
                        list.add(inLine);
                   System.out.println("Control Record for giro2itcs_"+strType+"is:"+ inLine);
                   inputFileReader.close();
                   inputStream.close();
                   for (int i=0; i<inLine.length(); i++ )
                        str1 = inLine.substring(19,23);
                   System.out.println("date of the transaction is:"+str1);
                   if (str .equals(str1)){
                        System.out.println("giro2itcs_"+strType+".txt file is created today");
                        return "true";
                   else{
                        System.out.println("giro2itcs_"+strType+".txt file is not created today");
                        return "false";
                   }// end of if
                   return "test";
              }// end of try
              catch(Exception e) {
              System.out.println("The Exception is ::::::::::::::"+e);
    return "one";
    }//end of giroReturnFileDate(...) method
    }//end of of the class
    main method is seperate. this program compiles fine but am not getting the return value for this. none of the return values. plzzz help me.

    can you send me the code complete one ...
    i will debug and solve the problem
    [email protected]
    By publishing your email address you are likely to get loads of spam.

  • Get the return value of an RFC function / BAPI

    Hello,
    I'm a Web Dynpro Java beginner and I try to get the return value (domain: NUMC6) of an RFC function without success.
    Here is what I do, could you please tell me what is wrong?
    First, here is my context:
    Context
    |
    |---- ZMy_Bapi
         |
         |---- MyOutputResult
         |     |
         |     |---- MyReturnValue
         |
         |---- MyInput
    My model:
    MyModel
    |
    |---- ZMy_Bapi_Input
         |
         |---- Output
         |     |
         |     |---- ZMy_Bapi_Output
         |          |
         |          |---- Return_Value
         |
         |---- Input_Value
    The mapping between them:
    - MyInput is mapped to Input_Value
    - MyReturnValue is mapped to Return_Value
    And my code:
    ZMy_Bapi_Input bapiInput = new ZMy_Bapi_Input();
    wdContext.nodeZMy_Bapi().bind(bapiInput);
    bapiInput.setInput_Value("A value");
    executeZMy_Bapi();
    ZMy_Bapi_Output bapiOutput = new ZMy_Bapi_Output();
    wdContext.nodeMyOutputResult().bind(bapiOutput);
    IMyOutputResultElement outputElement = wdContext.nodeMyOutputResult().currentMyOutputResultElement();
    String result = outputElement.getMyReturnValue();
    Finally, here is the code of the executeZMy_Bapi() function:
    try {
         wdContext.currentZMy_BapiElement().modelObject().execute();
         wdContext.nodeMyOutputResult().invalidate();
    } catch (Exception ex) {
         ex.printStackTrace();
    My problem is that "result" keeps being empty
    Thanks in advance for your help!

    It still doesn't work, I'm gonna turn crazy!
    But there is one good point: I get the method you mentioned: getZMy_Bapi_OutputElementAt and getMyReturnValue without casting, just as you said first.
    Here are the updated context, model, mapping and code.
    Context:
    MyContext
    |
    |---- ZMy_Bapi
         |
         |---- MyOutputResult
         |     |
         |     |---- ZMy_Bapi_Output
         |          |
         |          |---- MyReturnValue
         |
         |---- MyInput
    Model:
    MyModel
    |
    |---- ZMy_Bapi_Input
    |     |
    |     |---- Output
    |     |     |
    |     |     |---- ZMy_Bapi_Output
    |     |          |
    |     |          |---- Return_Value
    |     |
    |     |---- Input_Value
    |
    |
    |---- ZMy_Bapi_Output
         |
         |---- Return_Value
    Mapping
    ZMy_Bapi     --> ZMy_Bapi_Input
    MyOutputResult     --> Output
    ZMy_Bapi_Output     --> ZMy_Bapi_Output
    MyReturnValue     --> Return_Value
    MyInput          --> Input_Value
    Code
    ZMy_Bapi_Input bapiInput = new ZMy_Bapi_Input();
    wdContext.nodeZMy_Bapi().bind(bapiInput);
    bapiInput.setInput_Value("A value");
    executeZMy_Bapi();
    ZMy_Bapi_Output bapiOutput = new ZMy_Bapi_Output();
    wdContext.nodeMyOutputResult().bind(bapiOutput);
    String result = "";
    for (int i = 0; i < wdContext.nodeZMy_Bapi_Output().size(); i++) {
         IZMy_Bapi_OutputElement resultElem = wdContext.nodeZMy_Bapi_Output().getZMy_Bapi_OutputElementAt(i);
         if (resultElem.getMyReturnValue() != "" && resultElem.getMyReturnValue() != null) {
              result = resultElem.getMyReturnValue();
    Edited by: Franis Pignon on Oct 17, 2008 11:16 PM

Maybe you are looking for

  • Click wheel stuck (not on hold)

    my click wheel is stuck. i tried resetting and restoring and all that. all my other buttons work. this is really wierd. please help me!!! do i need to get my iPod serviced? i hope not, cause that costs a fortune... thanks!! dell   Windows XP  

  • List of apps

    I've been downloading and installing apps since the day the app store launched. I've probably purchased hundreds of apps, both free and not free. Without going into details about my specific problem, is there a way for me to get a list of every appli

  • Where do I Download Bootcamp 3.0 for windows

    This may be a silly question and I get the feeling the answer will be obvious, But where do I download bootcamp for my windows 7 side I tried to install 3.2 for W7 64bit "http://support.apple.com/kb/DL979" and got an error requires 3.1 downloaded 3.1

  • Combobox Selection Takes Action

    I am trying to learn how to use a combobox selection (two items in the list) to take and action such as changing the color of boxes I have acting as a border around my form or, better yet, possibly to hide or view a button. I am asking for help in de

  • [SOLVED] PC reboots by itself after grub

    Hi all, like in the tilte, when I turn on my computer, it reboots by itself just after grub, no error message is shown, it just reboots. I can boot to my Windows partition though. I tried to boot with the partion directory (/dev/sdX) instead of UUID.