How to fetch records from the database into a combo box?

Hi:
I´m really new with ABLBPM and I´m trying to fetch records from the database to display them into a combo box as valid values for a presentation but I´m using a dynamic method with this code:
<em>for each row in SELECT campo1, campo2 from TABLE</em>
<em>do</em>
<em>solicitudes[] = [row.campo1, row.campo2]</em>
<em>end</em>
<em>return solicitudes
</em>And the debugger says that SQL instructions can be used only in fuctions and procedures that are executed on the server.
Do you know another way to do it?
P.D. Sorry for my terrible english
Greetings

Hi Steve,
Thank you, your idea is perfect, but when I try to run the screenflow where the combo should be filled I get this error:
fuego.lang.ComponentExecutionException: No se ha podido ejecutar correctamente la tarea.
Motivo: 'java.lang.NullPointerException'.
     at fuego.web.execution.InteractiveExecution.setExecutionError(InteractiveExecution.java:307)
     at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:166)
     at fuego.web.execution.impl.WebInteractiveExecution.process(WebInteractiveExecution.java:54)
     at fuego.webdebugger.servlet.DebuggerServlet.redirect(DebuggerServlet.java:136)
     at fuego.webdebugger.servlet.DebuggerServlet.doPost(DebuggerServlet.java:85)
     at fuego.webdebugger.servlet.DebuggerServlet.doGet(DebuggerServlet.java:66)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
     at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
     at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
     at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
     at fuego.web.execution.servlet.ServletExternalContext.forwardInternal(ServletExternalContext.java:197)
     at fuego.web.execution.servlet.ServletExternalContext.processAction(ServletExternalContext.java:110)
     at fuego.webdebugger.servlet.DebuggerExecution.dispatchComponentExecution(DebuggerExecution.java:64)
     at fuego.web.execution.InteractiveExecution.invokePrepare(InteractiveExecution.java:351)
     at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:192)
     at fuego.web.execution.impl.WebInteractiveExecution.process(WebInteractiveExecution.java:54)
     at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:223)
     at fuego.webdebugger.servlet.DebuggerServlet.doDebug(DebuggerServlet.java:148)
     at fuego.webdebugger.servlet.DebuggerServlet.doPost(DebuggerServlet.java:82)
     at fuego.webdebugger.servlet.DebuggerServlet.doGet(DebuggerServlet.java:66)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
Any ideas??
Thanks and greetings

Similar Messages

  • Fetching 3 laks records from the database

    Hi All,
    I have a requirement that if we are fetchin 3 lakks records from the database, can we fetch the records in a single span of time ,if yes then how?
    If no, then we have to fetch the recods multiple times but since for the first time it is fetching 1 lakh records and for the next time how the bpel engine know that it has to fetch 1000001 record.
    Can anybody came this type of scenario. Please guide me on this.
    Regards,
    Ch

    There are some options given here @ http://myexperienceswithsoa.blogspot.com/2010/06/db-adapter-polling-tricks.html
    Check them out.
    But if you reading so much of data at once, you better have the necessary infrastructure to handle the load like memory, jvm tuning, etc ...
    If there is a limitation, you will need to assess your polling record count to be may 10K or so to strike a balance on the performance.
    Hope this helps.
    Thanks,
    Patrick

  • How I can transfer data from the database into a variable (or array)?

    I made my application according to the example (http://corlan.org/2009/06/12/working-in-flash-builder-4-with-flex-and-php/). Everything works fine. I changed one function to query the database - add the two parameters and get the value of the table in String format. A test operation shows that all is ok. If I want to display this value in the text area, I simply drag and drop service to this element in the design mode
    (<s:TextArea x="153" y="435" id="nameText" text="{getDataMeanResult.lastResult[0].name}"  width="296" height="89"  />).
    It also works fine, just a warning and encouraged to use ArrayCollection.getItemAt().
    Now I want to send the value to a variable or array, but in both cases I get an error: TypeError: Error #1010: A term is undefined and has no properties..
    How can I pass a value from the database into a variable? Thank you.
    public var nameTemp:String;
    getDataMeanResult.token = authors.getDataMean(arrayOfNumber[0], dir_id);
    nameTemp = getDataMeanResult.lastResult[0].name;
    public var nameArray:Array = new Array();
    for (var i:uint=o; i<3; i++){
    getDataMeanResult.token = authors.getDataMean(arrayOfNumber[i], dir_id);
    nameArray[i] = getDataMeanResult.lastResult[0].name;
    And how i can use syntax highlighting in this forum?

    Astraport2012 wrote:
    I have to go back to the discussion. The above example works fine when i want to get a single value of the database. But i need to pass an array and get an array, because i want to get at once all the values for all pictures tooltips. I rewrote the proposed Matt PHP-script and it works. However, i can not display the resulting array.
    yep, it won't work for Arrays, you'll have to do something slightly more intelligent for them.
    easiest way would be to get your PHP to generate XML, then read that into something like an ArrayList on your HTTPService result event (depends what you're doing with it).
    for example, you could have the PHP generate XML such as:
    <pictures>
         <location>test1.png</location>
         <location>test2.png</location>
         <location>test3.png</location>
         <location>test4.png</location>
         <location>test5.png</location>
         <location>test6.png</location>
    </pictures>
    then you'll read that in as the ResultEvent, and perform something like this on it
    private var tempAC:ArrayList = new ArrayList
    protected function getStuff_resultHandler(event:ResultEvent):void
        for each(var item:Object in event.result.pictures)
           var temp:String = (item.@location).toString();
           tempAC.addItem(temp);
    in my example on cookies
    http://www.mattlefevre.com/viewExample.php?tut=flash4PHP&proj=Using%20Cookies
    you'll see an example of how to format an XML structure containing multiple values:
    if($_COOKIE["firstName"])
            print "<stored>true</stored>";
            print "<userInfo>
                    <firstName>".$_COOKIE["firstName"]."</firstName>
                    <lastName>".$_COOKIE["lastName"]."</lastName>
                    <userAge>".$_COOKIE["userAge"]."</userAge>
                    <gender>".$_COOKIE["gender"]."</gender>
                   </userInfo>";
        else
            print "<stored>false</stored>";
    which i handle like so
    if(event.result.stored == true)
                        entryPanel.title = "Welcome back " + event.result.userInfo.firstName + " " + event.result.userInfo.lastName;
                        firstName.text = event.result.userInfo.firstName;
                        lastName.text = event.result.userInfo.lastName;
                        userAge.value = event.result.userInfo.userAge;
                        userGender.selectedIndex = event.result.userInfo.gender;
    depends on what type of Array you're after
    from the sounds of it (with the mention of picture tooltips) you're trying to create a gallery with an image, and a tooltip.
    so i'd probably adopt something like
    <picture>
         <location>example1.png</location>
         <tooltip>tooltip for picture #1</tooltip>
    </picture>
    <picture>
         <location>example2.png</location>
         <tooltip>tooltip for picture #2</tooltip>
    </picture>
    <picture>
         <location>example3.png</location>
         <tooltip>tooltip for picture #3</tooltip>
    </picture>
    etc...
    or
    <picture location="example1.png" tooltip="tooltip for picture #1"/>
    <picture location="example2.png" tooltip="tooltip for picture #2"/>
    <picture location="example3.png" tooltip="tooltip for picture #3"/>
    etc...

  • How to delete the child record from the database

    how to delete a parent and child record from the database can we do it in the servlet and my database is oracle

    I'm not sure I understand the question but you could certainly use the JDBC API from within your servlet to access and modify a DB. You could also use an EJB layer to access your DB and accomplish the same tasks.

  • How to get first 10 records from the database using JSP

    i want ot get first 10 records from the database and then after clicking the next button in the page,it must show the next precceding 10 records from the database.i am getting the first 10 records .but how to post to the same page to get another preceeding 10 record.

    Search the forums - this has been asked a lot. I usually recommend experimenting with tops and order bys until you're satisfied.
    Kind regards,
      Levi

  • In Mail 7.3 on my Retina MacBook Pro on OS 10.9.4, how can I type from the keyboard into a mail message using the Apple Symbols font?

    In Mail 7.3 on my Retina MacBook Pro on OS 10.9.4, how can I type from the keyboard into a mail message using the Apple Symbols font?
    When I select the Apple Symbols font from the list accessed from under Format/"Show fonts"/collection-all fonts/Apple Symbol, and then continue typing, I get normal letters, if in a slightly different font.
    How can I type using the Apple Symbol font?  I want to use that font to include keyboard and cursor selections of actual screen symbols to help write easily understood explicit computer lesson emails to my 92 year-old mom from a few hundred miles away.
    Steve

    In Mail 7.3 on my Retina MacBook Pro on OS 10.9.4, how can I type from the keyboard into a mail message using the Apple Symbols font?
    When I select the Apple Symbols font from the list accessed from under Format/"Show fonts"/collection-all fonts/Apple Symbol, and then continue typing, I get normal letters, if in a slightly different font.
    How can I type using the Apple Symbol font?  I want to use that font to include keyboard and cursor selections of actual screen symbols to help write easily understood explicit computer lesson emails to my 92 year-old mom from a few hundred miles away.
    Steve

  • How to display records from a query into non-database field

    Hi
    I a have a problem:
    I have a query with many tables and 6 column(select a,b,c,d,e,f from x,y,z,t,s,g where conditions) and I use 3 parameters.
    I create 3 parameters :datai,:dataf and :partener and a button with a trigger when button is pressed.
    Then a create a manualy block with six field non-database a1,b1,c1,d1,e1,f1.
    Now I want to display all the records from my query into a1,b1,c1,d1,e1,f1 where a1=a,b1=b,etc. and all the records (if I have 20 record, it will display 20 records in non-database field) when I press the button.
    How I made:
    I create a cursor with query then
    begin open cursor
    loop
    fetch cursor into :a1,:b1,:c1,:d1,:e1,:f1;
    end loop;
    close cursor;
    end;
    It display one record in a1,b1,c1 only and it have to display 100 records and are date for all the fields.
    Can somebody help me in this problem?
    Thanks.
    Edited by: 928437 on Oct 1, 2012 2:55 AM

    Creating a view, and querying that into a database block is an excellent solution.
    To use the non-database block:
    You're missing the all-important Next_Record; command.
    <pre> Begin
    Go_block('X'); -- block X is the non-database block
    Clear_Block(No_Validate);
    open cursor X1;
    loop
    If :System.Record_status != 'NEW' then
    Next_Record;
    End if;
    fetch X1 into :a1,:b1,:c1,:d1,:e1,:f1;
    Exit when X1%NOTFOUND;
    end loop;
    close X1;
    end;</pre>

  • How do i store and fetch image from the Database(Access)

    i am facing one problem in inserting the image into the database.the steps i followed as
    1)i have created one database(access) as "Image" and into that one table as "Image" and field as "image"
    type of the field is ole object.
    2)i have inserted one image into the image field through "database.vi"
    3)now i am trying to get the image from the database by "Fetching Example.vi"
    4)it will succesfully retrieve the image from that field .
    5)but when i close the both programs and reopen those that time i am unable to get retrieve the image.
    Attachments:
    Add_to_Database.vi ‏78 KB
    Fetch_from_database.vi ‏67 KB

    I would like to suggest different approach for saving the images in the database.
    I was working on Medical Imaging Company. The way we save the images in real-time was by writing the name and path of the images to database.
    The images themselves where saved directly to disk.
    I don�t think that access is very good in taking care of GBytes of data.
    It happens some time that the database gets damage. If you have the images separately you can create fix procedure. (We had one).
    Good Lack,
    Amit Shachaf,

  • How to rerieve records from the table starting with character 'D'

    Hi Folks,
    How to get the records from the table starting with character 'D'.
    Select Max (fld1) fron tab1 into tab1-fld1 where fld 2 = l_fld2 and starting character of fld(1) is 'D'.
    last record in the table starting with character 'D'
    How can i do that??
    Pl explain.
    Thanks,
    Matt

    Hi,
    Select Max (fld1) fron tab1 into tab1-fld1 where fld 2 = l_fld2 and starting character of fld(1) is 'D'.
    Select MAX (fld1)
       From  tab1
    into table itab
    where fld 2 = l_fld2
       and fld1 like 'D%'.

  • Algorithm to retrieve link of records from the database efficiently

    Hi,
    I have some records in database related to supply chain.
    e.g. N1 supplies item I1 to Node N2 is represented as N1 I1 N2.
    Now I want to find all parent nodes or say chain of nodes supplying to particular node in an efficient way.
    Currently I am using recursion but for each recursion 1 query fires & performance drops considerably. Can you suggest me the efficient way to do it?
    Regards,
    Veena

    depending on how large the dataset in the database is, you could just select all the data from the database in one go, add it all to a collection and perform you analysis on the collection. This would save a considerable amount of time as database roundtrips are expensive.
    If you dataset from the database is too large to fit in memory in one go you could select data in say rows of 1000 at a time and/or use a local disk cache instead of a remote DB query every time.

  • How to fetch data from single database table using 2 internal tables.

    Hi friends,
    i am a new user of ABAP and also SDN.
    i need a help. 
    i want to fetch data from one database table based on primary keys of 2 internal tables.  how to put in where clause.
    Thanks in advance.

    hii
    refer to following code ..i hope it will help you
    SELECT matnr                         " Material Number
        FROM mara
        INTO TABLE i_mara
       WHERE matnr IN s_matnr.
      IF i_mara[] IS NOT INITIAL.
        SELECT matnr                       " Material Number
               werks                       " Plants
               prctr                       " Profit Center
          FROM marc
          INTO TABLE i_marc
           FOR ALL ENTRIES IN i_mara
         WHERE matnr = i_mara-matnr
           AND werks IN s_werks.
      ENDIF.                               " IF i_mara[] IS NOT INITIAL
      i_output = i_marc.
      IF i_marc[] IS NOT INITIAL.
        SELECT matnr                       " Material Number
               werks                       " Plants
               lgort                       " Storage Location
          FROM mard
          INTO TABLE i_mard
           FOR ALL ENTRIES IN i_marc
         WHERE matnr EQ i_marc-matnr
           AND werks EQ i_marc-werks
           AND lgort IN s_lgort.
      ENDIF.                               " IF i_mara[] IS NOT INITIAL
    regards
    twinkal

  • Problem with displaying records from the database in a table ui element

    Hi,
    Iam creating an application which retrieves data from an oracle database. Iam able to connect to the database and retrieve the data in a result set. Then I try to set these values in a context node as follows,
    while (resultSet.next()) {
    String name = result.getString(1);
    String EmpId = result.getString(2);
    IEmpNode node = wdContext.nodeEmp();
    IEmpElement el = node.createEmpElement();
    el.setName(name);
    el.setEmpId(EmpId);
    node.addElement(el);
    where the context structure is emp(node)
                                   ---name(attribute)
                                   ---empId(attribute)
    Then I have bound the node emp to a table ui element.If I try to deploy this it comes up with Internal Server error.
    But if try this way, without creating a node, only with attributes name and empId,
    wdContext.currentContextElement.setName(name);
    wdContext.currentContextElement.setEmpId(EmpId);
    and binding the attributes to inputfields in the view, Iam able to see the last record in the database table.
    So where am I going wrong while using the table ui element?
    Regards,
    Rachel

    Hi
    Try this
    //Create the node in outer of while loop and bind to Table UIElement
    IEmpNode node = wdContext.nodeEmp();
    while (resultSet.next()) {
    String name = result.getString(1);
    String EmpId = result.getString(2);
    IEmpElement el = wdContext.createEmpElement();
    el.setName(name);
    el.setEmpId(EmpId);
    node.addElement(el);
    Kind Regards
    Mukesh

  • How to fetch records from query.....

    hii experts,
    How to fetch data from following query.... The query is depend on the Project_Id
    SELECT           'Plant Consumption' TYP,                                 -1*ROUND(SUM (MTA.BASE_TRANSACTION_VALUE)) S_VALUE,
    TO_CHAR (MMT.TRANSACTION_DATE, 'Mon-rrrr') MNTYR,
    TO_CHAR (MMT.TRANSACTION_DATE, 'rrrrmm') MNT,
                        TO_CHAR(MMT.TRANSACTION_REFERENCE) TRX_REF,
                        MMT.SOURCE_LINE_ID SRC_LIN,
                        TO_CHAR(MMT.SHIPMENT_NUMBER) SHP
    FROM (SELECT TO_CHAR( OLA.HEADER_ID) HDR1,
                        OLA.LINE_ID LINE1,
                                  OLA.PROJECT_ID ,
                                  TO_CHAR(OLA.SHIPMENT_NUMBER) SHP1
                             FROM OE_ORDER_HEADERS_ALL OHA,
                                  OE_ORDER_LINES_ALL OLA
                             WHERE OHA.HEADER_ID = OLA.HEADER_ID
                             AND OHA.ORG_ID = OLA.ORG_ID
                             AND OLA.PROJECT_ID = :P_PROJECT_ID
                             AND OLA.ORG_ID = :P_ORG_ID
                             AND OLA.FLOW_STATUS_CODE = 'CLOSED'
                             ) A,
                        MTL_MATERIAL_TRANSACTIONS MMT,
    MTL_TRANSACTION_ACCOUNTS MTA,
    GL_CODE_COMBINATIONS GCC
    WHERE MMT.TRANSACTION_ID = MTA.TRANSACTION_ID
    AND GCC.CODE_COMBINATION_ID      = MTA.REFERENCE_ACCOUNT
    AND MMT.TRANSACTION_TYPE_ID = 33
    AND GCC.SEGMENT1 = '11'
    AND GCC.SEGMENT2 = '13'
    AND GCC.SEGMENT3 = '34381'
    AND GCC.SEGMENT4 = '0000'
    AND                GCC.SEGMENT5                     =      '000000'
    AND MMT.SHIPMENT_NUMBER IS NOT NULL
    AND MMT.PROJECT_ID IS NULL
    AND           A.HDR1           = TO_CHAR(MMT.TRANSACTION_REFERENCE)
    AND                A.LINE1           = MMT.SOURCE_LINE_ID
    AND A.PROJECT_ID = :P_PROJECT_ID
    AND                A.SHP1           = TO_CHAR(MMT.SHIPMENT_NUMBER)
    GROUP BY TO_CHAR (MMT.TRANSACTION_DATE, 'rrrrmm'),
         TO_CHAR (MMT.TRANSACTION_DATE, 'Mon-rrrr'),MMT.TRANSACTION_REFERENCE,MMT.SOURCE_LINE_ID,MMT.SHIPMENT_NUMBER;
    -----

    hii
    The project_number is matching column in table mtl_material_transaction mmt and A (FROM CLAUSE query). But data retreive based on
    WHERE MMT.PROJECT_ID IS NULL
    AND A.PROJECT_ID = :P_PROJECT_ID
    PS

  • Adding a record from the database to radiobutton

    hi everyone
    i am trying to retrive the records from the ms Access database and add it to the radiobuttons.
    i did retrieve the data from the database and added it to the table and then added it to the radiobutton but the view of it is not clear.
    if anyone can give suggestions on it , it will be helpful
    thank you

    Can you elaborate on "but the view of it is not clear." ? Does it mean it looks blur on your monitor?? or it has been trying to hide at the corner of your screen??

  • How to retrieve data from the Database after deleting rows from VO ?

    Hello,
    I am using Jdeveloper 11.1.2.1.0
    I have a master and a child .
    So according my use case when a value in the master vo changes the corresponding child has to be deleted.
    but when i change back to any other value i want to undo the delete operation and get back the values in the child.
    Is there any way to do it?
    Regards,
    Nigel.
    Edited by: Nigel Thomas on Mar 29, 2012 5:07 AM
    Edited by: Nigel Thomas on Mar 29, 2012 5:09 AM

    Hi all,
    I want to do a validation based on a SelectOneChoice List Value.
    Based on which value in the select one choice is being selected, thedata from the VO should be DELETED or NOT-DELETED.
    To do this I wrote a Managed Bean and the delete part is working fine if a particular value of the SelectOneChoice is selected.
    Since the rows are deleted from the VO, after I change the SelectOneChoice value to the previous one I cannot retrieve the rows.
    I thought of two ways:
    1. As the Deleting option in the SelectOneChoice is selected the rows should be deleted from the VO and when reverted back to not-Deleting option the Rollback of Transaction method written in the Managed Bean should take place.
    2. As the Deleting option is selected the data should be deleted from the VO and when reverted back to non-Deleting option, a query should be made from the Database.
    The first plan was dropped because it is not VO-specific. If there are more than 1 VO in the page then whatever changes are made in the page will be reverted back as soon ad Rollback of transaction is done.
    So the now i am left to go with the second plan.
    Is there any way to implement the second plan?
    If so...Will it compromise the performance of the application?
    Or else, Is there any other way to implement my Use-Case ???
    Regards,
    Nigel.

Maybe you are looking for

  • How to keep hyperlink from excel to PDF?

    I have some Hyperlinks in excel, and when i convert to PDF, they dont work. I already installed the Adobe Acrobat PRO XI (Trial version) How can i do this? tks

  • The TRIGGER LIST function is not working.

    I am trying to change the voltage output on several Agilent 661xxA modules simultaneously. The TriggerList functions is supposed to do this but it is not working. Only one of the power supply modules is turned on when I execute the fire the trigger.

  • Expressions and pattern matchers

    I want to parse some string using reg expressions, but I want to specify a start string -- any characters -- end string. I want it to stop the first time it finds the end string not the last time it finds it. Here is my code public static void main(S

  • How to edit a photo with a third party app ?

    I use Pixelmator on both ipad and imac and I would like to edit my photos on the mac the same way I do on my ipad but I can't find the way to do so. Has anyone found a way to edit Photos with Pixelmator or Photoshop from the Mac Photo App ?

  • Trying to update my iPad to ios6.  Unsuccessfully.

    Trying to update my iPad to ios6.  I have the latest version of iTunes.  I plug in my iPad and look at summary and shows I need to update.  I click update.  Message pops up saying I haven't backed up some items off my iPad. Click continue or cancel.