Is it possible to put the results of a query in a variable to use in the bean class?

Hello, I am using JDeveloper 12.1.2.0.0

I like to keep the result of my queries (the method that I created in the AppModule) in a richeTableau or another type of variable, so I can get results and I don't have to make unnecessary after queries. I don't think that the query is the problem but keeping the results.

I tried to do in using this:

public String testVFactSales (String conditions) {}

PreparedStatement query = getDBTransaction () .createPreparedStatement ("" + "select * from v_fact_sales"+ conditions, 0 ");

ResultSet rs;

Outcome of the result set;

Result of the richeTableau;

String result = null;

try {}

query.setString (1, conditions);

Query.Execute ();

Query.Execute ();

result = query.getGeneratedKeys ();

Query.Close ();

System.out.println ("result:" + result.toString ());

return result.toString ();

} catch (SQLException e) {}

e.printStackTrace ();

}

Return ' ';

}

As you can see, I have already tried a few solutions, but so far I have only errors (cannot convert or null exception, when I try to put the result in a richeTableau in my bean class)

Any ideas?

It is very important for me, because it would improve the performance of my project a lot.

Kind regards

Frederico.

Although the issue is not 100% responded, I used the idea that Shay told me, where you can create a method in your AppModule to set your where clause!

Good luck to everyone who has the same problem.

As an attack similar to what I wanted in the first place, you can check this:

https://community.Oracle.com/thread/2619669

Kind regards

Frederico.

Tags: Java

Similar Questions

  • defining the results of a query to a variable

    Hi all

    I'm having a problem affecting the results of a query to a variable. What I'm trying to do, is to do an AJAX call to a .cfc file and pass back the results of the function. The main problem is, I'm again moving a block of HTML (resulting from a cfquery in a cfoutput) stored in a variable. My code is something like...

    < name cffunction = "getText" access = "remote" returntype = 'Cancel' >

    < datasource = "" #request.dsn # cfquery "name ="queryTable">"
    SELECT kort, infoB

    Of infoTable

    < / cfquery >


    < cfset result = ' <!-this is the part I'm stuck, I want the table go here. -> ">"

    < table >
    < cfoutput query = "tablequery" >
    < b >
    < td > #infoA # < table > < td > #infoB # < table >
    < /tr >
    < / cfoutput >
    < /table >


    < cfwddx action = "cfml2js" input = "" # result # ' toplevelvariable 'o' = > "

    < / cffunction >

    It is a simplified version of what I want to do, but you get the idea...

    Is it still the right way to go about this?  Thank you

    That's what I get for trying the E-mail response feature!  Are you not happy, that I double checked my post.

    You could do a lot of string concatenation here to do stuff like"& Kort &""& infoB &""> time and time again."  But in reality the tags is so much easier to use.



      

        
      

    #infoA #.#infoB #.

  • Cannot access the template page links in the bean class

    Hi all

    I use JDEV 12 c.

    I have a model in which I have 2 languages English and Hindi.

    Change language (when), I have re - run LOV queries for the respective language.

    so I added links method in model pagedef and try to access the same thing in the bean model class.

    When I have access to, I get Nullpointer Exception, who says the OperationBinding, does not exist in pagedef.

    is there a any restriction I can't access model pagedef in the bean class.

    Please suggest on this.

    Thank you

    Vieira

    https://blogs.Oracle.com/jdevotnharvest/entry/how_to_invoke_adf_bindings

  • Is it possible to put the files in drive J on the C drive?

    By transferring data from XP again Windows 7, provided about my Outlook seems not to have been transferred using the Easy Transfer Wizard, so I downloaded the missing data on a disc of J.  In order to put in my Office Outlook, he needs on the C drive in my new computer, it's a .pst file.  Is it possible to transfer the info from the j to the portion of the C drive that has other transferred Office Outlook .pst files?  If so, how?

    Thank you.

    Open Outlook
    Click on the file tab
    Click on Open & Export
    In the main window, click on Import/Export
    In the wizard import / export , click import from another program or file
    Click Next
    Click Outlook Data File (.pst)
    Find and select the file .pst on your drive J
    Select one of the options three import
    Click Next
    Click Archive Folders
    Check include subfolders
    Select one of the places two import
    Click Finish
    You have completed

  • Hi, is it possible to change the security class for folders that contain data forms?

    Hello

    We would like to change the class of security for a folder that contains the data forms in our application.

    This should be done on two occasions during our monthly closing.

    When I create a new folder I can assign the class of security to the folder. But how it works for an existing folder?

    Thank you very much

    Björn

    HFM 11.1.2.1

    Hello

    To answer your question, there is no way to change the safety classes existing folder with the existing versions of HFM. We have already asked DEV as an improvement. The only solution is to remove the existing form folder and then re-create.

    Kind regards

    Madhu.

  • How to display the error message by supporting the bean class - Jdev 10.1.3.4

    Hi people.
    I have a page with a form of adf and some text entry fields
    A text entry field is based on a transitional attribute.
    I created a validation in a bean class of support to do some calculations. If the user type a wrong number in this field, I need to validate the number in my support bean method (which is ok)
    and show a validation error, like this validations of EO. Is this possible?
    Willian thanks

    Hello

    Yes, it is, try something like the following:

    FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "some message summary", "some message detail");
    FacesContext.getCurrentInstance().addMessage(null, message); // Null for global message
    

    Kind regards

    ~ Simon

  • Is it possible to put the property inside the loop node?

    I created three nodes of separation of property (color graphics) for my 3 XY graphs.

    Is it possible to have a property node, put this tag inside the loop where I ranges from 1 to N, and say plot_color_i

    where plot_color_1 would update 1 XY graph, plot_color_2 update XY Graph 2, etc. ?

    See the attached VI.

    Yes.  Create an array of references to the XY graphs and have this auto-index in the property node in the loop For

  • Is it still possible to put the URL bar on the front?

    Before the most recent change on my windows machines, I have had the firefox toolbar url and tabs button all on a single bar inside the "aero" windows style window decoration.

    Is it still possible to do? For the moment, I can't move the toolbar URL or menu options out of the toolbar and in the window decoration. If this is not possible can be done with an add-on? This change has doubled real estate display should read these.

    1. Classic restaurateur theme installation and restart Firefox when prompted.
    2. Open the modules (Ctrl + Shift + A Manager; Mac: Command + shift + A), then the Extensions category.
    3. Beside the classical restaurant theme, click on the Options button.
    4. On the main tab, make sure 'Mobile back-forward button' is checked. You can also check "Hide urlbars stop & reload buttons" and "combine stop & reload buttons. Close the options window when finished.
    5. Right-click on a zone empty of the tab bar and select Customize.
    6. Drag the front/rear, address bar, and any other key that you want in the toolbar and navigation on the tab bar.
    7. Drag all the unwanted items off the coast of the toolbar and navigation on the range of customization.
    8. Click the Customize the output at the bottom right button when finished.
    9. In modules, Extensions category, beside the classical Restorer theme Manager, click the Options button.
    10. On the main tab, under general UI, check "hide navigation bar. Close the options window when finished.
  • Is it possible to put the speakers as the default output for the sounds of Windows and the headset as default device for music?

    Hello

    Is it possible to have all the sounds through the speakers, including music from WMP and WMP music in my headphones? Headset is USB (but I also have a Jack) and my speakers are with 3 Sockets at the back of my pc.
    Thank you.
    Friend,
    Zoenvisje
     
    Original title: all sounds through loudspeakers and music through headphones

    Hi zoenvisje,

    Thanks for posting your query in the Microsoft Community.

    Want to know if it is possible to play any sound on the computer with the headset. It can be difficult when something that is important to you does not work as expected.

    Method-

    It is not possible to make these changes on the computer.

    You can set a default speakers and use a different music player that supports select the default output as the headset device.

    We know if you need help. We will be happy to help you. We, at tender Microsoft to excellence.

    Thank you.

  • [Advanced] Is it possible to put the IP Address of the default gateway for a vmnet NAT?

    I am trying to duplicate a computer lab on my Mac environment, and I need the bridge will be located at one address other than VMWare wants to implement.  I know how to create a static IP address for a virtual machine, but I need adjust the routers option in Library/Preferences/VMWare Fusion/vmnet2/dhcpd.conf.  Will there be a networking Library/Preferences/VMWare Fusion/to allow this?  Is there something I can put before or after the "DON'T CHANGE" section dhcpd.conf that replace the parameters in this section?

    Except that, is there a way to prevent the re-writing of the dhcpd.conf file after I made a change to VMWare?  I tried it wrong in various ways, including the re - generate the hash SHA1 of the networking file and reset the modification time of the dhcpd.conf to the original time, without success.

    Here are my current settings:

    subnet 10.10.0.0 255.255.0.0 subnet mask}

    range 10.10.128.0 10.10.255.254;

    option broadcast-address 10.10.255.255;

    option domain-name-servers 10.10.0.2.

    option domain-name localdomain.

    by default-lease-time 1800;                # default is 30 minutes

    Max-lease-time 7200;                    # default is 2 hours

    option netbios-name-servers 10.10.0.2.

    routers option 10.10.0.2.

    }

    host vmnet2 {}

    Hardware ethernet 00:50:56:C0:00:02;

    fixed-address 10.10.0.1;

    option domain-name-servers 0.0.0.0.

    option domain-name ";

    routers option 0.0.0.0.

    }

    And I'm changing the gateway to 10.10.0.2 to 10.10.1.250.  Maybe VMWare requires that the first IP address as the host and the second either the entry door and rewritten if not?

    Thanks in advance,

    Dave

    I found a way to do this.  Not sure if it's official, or if it will continue to work in the future.  In addition changes nat.conf, if you simply duplicate the part of the section "DON'T CHANGE" dhcpd.conf below, then the second version of the settings will cancel and replace the first.  Here is my solution:

    # Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet2.

    #

    # This file was generated automatically by Setup of VMware.

    # See Instructions below if you want to change.

    #

    # Define us domain-name-servers to satisfy some DHCP clients

    # (dhclient such as configured in SuSE, TurboLinux, etc..).

    # We also provide a domain name to the pump (Red Hat 6.x) happy.

    #

    # VMNET DHCP Configuration. Beginning of "DO NOT EDIT ARTICLE" #.

    # Instructions change: this section of the configuration file contains

    # News generated by the Setup program. Do not change it

    # section.

    # You are free to change to everything else. In addition, this section must start

    # on a new line

    # This file will get saved under a different name in the same directory

    # If this section is edited and you try to set up DHCP again.

    # Written on the: 04/11/2015-21:15:15

    allow unknown-clients;

    by default-lease-time 1800;                # default is 30 minutes

    Max-lease-time 7200;                    # default is 2 hours

    subnet 10.10.0.0 255.255.0.0 subnet mask}

    range 10.10.128.0 10.10.255.254;

    option broadcast-address 10.10.255.255;

    option domain-name-servers 10.10.0.2.

    option domain-name localdomain.

    by default-lease-time 1800;                # default is 30 minutes

    Max-lease-time 7200;                    # default is 2 hours

    option netbios-name-servers 10.10.0.2.

    routers option 10.10.0.2.

    }

    host vmnet2 {}

    Hardware ethernet 00:50:56:C0:00:02;

    fixed-address 10.10.0.1;

    option domain-name-servers 0.0.0.0.

    option domain-name ";

    routers option 0.0.0.0.

    }

    # VMNET DHCP Configuration. End of "DO NOT EDIT ARTICLE" #.

    subnet 10.10.0.0 255.255.0.0 subnet mask}

    range 10.10.128.0 10.10.255.254;

    option broadcast-address 10.10.255.255;

    option domain-name-servers 10.10.1.200.

    by default-lease-time 1800;                # default is 30 minutes

    Max-lease-time 7200;                    # default is 2 hours

    option netbios-name-servers 10.10.1.250.

    routers option 10.10.1.250;

    }

    -Dave

  • pl/sql is it possible to put the cursor in where clause?

    Hello

    I have this stored proc that works very well when it is passed a single ID... now he must pass a list of IDS as in
    function (cursor (select id from table))...


    its definition is like this:
    RETURN ACTIV_PKG.tADR_ACTIV PIPELINED IS function ADR_ACTIV (pi_NO_SEQ IN sys_refcursor)
    CURSOR c1 (p_NOSEQ IN sys_refcursor) IS
    WITH Lateststate AS
    (SELECT RESUM_ETA.NO_SEQ_CLE_PRIM NO_SEQ_ADR,
    ADR.NO_SEQ,
    RESUM_ETA. COD_ETA
    OF RESUM_ETA
    JOIN INTERNAL ADR
    ON ADR.NO_SEQ_ADR = RESUM_ETA.NO_SEQ_CLE_PRIM
    WHERE RESUM_ETA. COD_TBL = "ADR1".

    and IN ADR.NO_SEQ (p_NOSEQODS)


    )...

    You see that 'and ADR.NO_SEQ IN (p_NOSEQODS)' lines using only those on the list filters...

    the idea is to use the cursor c1 like this:
    BEGIN
    FOR rec1 IN c1 (pi_NO_SEQ)
    LOOP
    ...

    Except that I get an error with (p_NOSEQODS) because it is not supported...

    y at - there a trick to this?

    Should I use table instead of cursor in where clause IN (...)?


    I have not in a list of IDS and put it in where clause of my cursor c1... How to get there?

    Thanks for the advice/links

    See you soon!

    the idea is to use the cursor c1 like this:
    FOR rec1 IN c1 (pi_NO_SEQ)

    Don't know if it's really less awkward that solution regexp, but we here are:

       cur   sys_refcursor;
    
       cursor c2 (cur sys_refcursor)
       is
          select   *
            from   emp
           where   empno in (select   trim (t.column_value.extract ('//text()'))
                               from   table (xmlsequence (cur)) t);
    begin
       open cur for
          select   7788 from dual
          union all
          select   7900 empno from dual;
    
       for c in c2 (cur)
       loop
          dbms_output.put_line (c.ename);
       end loop;
    end;
    /
    SCOTT
    JAMES
    PL/SQL procedure successfully completed.
    
  • Is it possible to put the words in bold or underline things in email in thunderbird?

    When you send a note with the name of the books for example, I would like to highlight the name of the book which is the right thing to do, but I can't find anywhere in Thunderbird where I can use this option. Also, I can't find how to use italics or bold to emphasize something. Please notify. Thank you. Billie Matelski

    Perhaps you composed in HTML.

    Right-click on the account, in the folders pane, select settings and in composition and correct select compose in HTML.

  • Is Lenovo ThinkPad X220t 4294-CTO, possible to put the backlit keyboard in this machine?

    Hi once again, everything

    My question is the same as the topic

    Best regards.

    No, sorry.

    backlit keyboards come as an option on the T/X/W x 30 models. What are the 6 precision keyboards ranks Island-style and are not backward compatible models the x2x.

    HTH to clarify.

  • How to store the result of a query in a variable in the data model

    In a model of date I want to do something like this

    < name of dataTemplate = than one dataSourceRef "HURDetail" = "BRM_DATA_SOURCE" >
    < Parameters >
    < parameter name = "PARAM_THRESHOLD_VALUE" dataType = "number", defaultValue = "0" / >
    < / Parameter >

    < SQLStatement instance name = "Q1" >
    <! [CDATA]
    SELECT count (*) FROM TABLE_NAME
    []] >
    < / sqlStatement >

    -I want to assign the output of the above query to PARAM_THRESHOLD_VALUE so I can use it in future requests...
    -My query is complex, for reason of performance I want to store the output of the query.

    Please suggest how do...
    Made a package with the PARAM_THRESHOLD_VALUE parameter and the function value entry assigns the done variable to work?

    Thank you
    Shiva

    Hey Shiva,

    If you want to use the value of the counter in the other queries in the data model, you can have an alias for the extraction of County and use it as a bind variable in other queries as


    SELECT count (*) PARAM_THRESHOLD_VALUE
    FROM TABLE_NAME
    ]]>

    and can use it in another query as


    SELECT XYZ
    FROM TABLE_NAME2
    WHERE XXX = *: PARAM_THRESHOLD_VALUE *.
    ]]>

    Hope this is what you want.
    Thank you.

  • Is it possible to put an image in the preview before printing a pivot or a chart?

    Hello
    IM wondering if it is possible to put the image in the footer or the position or any where in the area to preview before printing or any other place I can easly design print my pivot chart or something else? There is no graphics available in the items section.

    Kind regards
    Pawel

    No, it is not possible.

    Place the pivot or the table in the Section of report

Maybe you are looking for