Why execute query twice?

I write a jsf page.there is a find botten,i drop and drag it from data control palette.then i modify it's ADFBinding method,like this:
public void find_action(ActionEvent actionEvent) {
BindingContainer bc = getBindings();
DCIteratorBinding db =
(DCIteratorBinding)bc.get("findBasRolesIter");
OperationBinding op = bc.getOperationBinding("findBasRoles");
Object ob = op.execute();
if (ob!=null){
RowImpl row = (RowImpl)db.getCurrentRow();
BasRoles role = (BasRoles)row.getDataProvider();
op = bc.getOperationBinding("findBasRoleHolders");
Map para = op.getParamsMap();
para.put("role_id", role.getRoleId().intValue());
ob = op.execute();
if (ob!=null){
op = bc.getOperationBinding("findBasRoleHrcNode");
para = op.getParamsMap();
para.put("role_id", role.getRoleId().intValue());
ob = op.execute();
the pageDEF like this
<executables>
<variableIterator id="variables"
RefreshCondition="${adfFacesContext.postback}"
Refresh="prepareModelIfNeeded">
<variable Type="java.lang.String" Name="findBasRoles_role_code"
IsQueriable="false"/>
<variable Type="java.lang.String" Name="findBasRoles_role_name"
IsQueriable="false"/>
</variableIterator>
<methodIterator id="findBasRolesIter" Binds="findBasRoles.result"
DataControl="BASjsdyFacadeLocal" RangeSize="10"
BeanClass="bas.entities.table.BasRoles"
Refresh="prepareModelIfNeeded"
RefreshCondition="${adfFacesContext.postback}"/>
<methodIterator id="findBasRoleHoldersIter"
Binds="findBasRoleHolders.result"
DataControl="BASjsdyFacadeLocal" RangeSize="10"
BeanClass="bas.entities.table.BasRoleHolders"
Refresh="prepareModelIfNeeded"
RefreshCondition="${adfFacesContext.postback}"/>
<methodIterator id="findBasRoleHrcNodeIter"
Binds="findBasRoleHrcNode.result"
DataControl="BASjsdyFacadeLocal" RangeSize="10"
BeanClass="bas.entities.table.BasRoleHrcNode"
Refresh="prepareModelIfNeeded"
RefreshCondition="${adfFacesContext.postback}"/>
</executables>
then ,when this page is running,i look the debug message from OC4J console like this
Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--client acquired
Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--SELECT ROLE_HOLDER_ID, LAST_UPDATED_BY, CREATED_BY, LAST_UPDATE_LOGIN, ENABLED_FLAG, PERSON_ID, CREATION_DATE, LAST_UPDATE_DATE, ROLE_ID FROM BAS_ROLE_HOLDERS
Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--client acquired
Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--SELECT ROLE_HRC_NODE_ID, LAST_UPDATED_BY, CREATED_BY, LAST_UPDATE_LOGIN, ENABLED_FLAG, NODE_ID, CREATION_DATE, LAST_UPDATE_DATE, ROLE_ID FROM BAS_ROLE_HRC_NODE
Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--client acquired
Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--SELECT ROLE_ID, LAST_UPDATED_BY, CREATED_BY, LAST_UPDATE_LOGIN, ENABLED_FLAG, ROLE_CODE, CREATION_DATE, LAST_UPDATE_DATE, ROLE_NAME FROM BAS_ROLES WHERE (UPPER(ROLE_NAME) LIKE '%abc')
Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--client acquired
Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--SELECT ROLE_HOLDER_ID, LAST_UPDATED_BY, CREATED_BY, LAST_UPDATE_LOGIN, ENABLED_FLAG, PERSON_ID, CREATION_DATE, LAST_UPDATE_DATE, ROLE_ID FROM BAS_ROLE_HOLDERS WHERE (ROLE_ID = 401.0)
Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--client acquired
Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--SELECT ROLE_HRC_NODE_ID, LAST_UPDATED_BY, CREATED_BY, LAST_UPDATE_LOGIN, ENABLED_FLAG, NODE_ID, CREATION_DATE, LAST_UPDATE_DATE, ROLE_ID FROM BAS_ROLE_HRC_NODE WHERE (ROLE_ID = 401.0)
the table BAS_ROLE_HRC_NODE ,BAS_ROLE_HOLDERS execute twice,
the BAS_ROLES execute once, why??

does anybody help?

Similar Messages

  • SetCurrentRowWithKeyValue - Does this execute View Object Query twice?

    Hi,
    I have a View Object for which on the prepare model of the page definition I am executing the setCurrentRowWithKeyValue action.
    In the log I see two queries being printed one with Bind Variable of the Key value that I have passed and right next to that I see one more query for the same view object that gets executed without any where clause.
    This causes the View Object to execute an open query which is causing performance issue.
    Any help/Insight on this problem is greatly appreciated.
    Thanks,
    Kumar K.

    Thanks for the response.
    Solution provided in the thread doesn't prevent the execution but it will not return any rows..But I am just curious to know that is there some thing different done while using setCurrentRowWithKeyValue?
    Why should it execute query twice once with Bind variable and next time without the bind variable?
    Kumar K.

  • Why JRC executes query two times? (reports.queryengine(?:?) - Executing query: ...)

    Hello! Using JRC. While creating the report for viewing, I noticed one interesting thing. Why JRC executes query two times AND first time is executed with default parameters AND if default parameters are NULL the query can be invalid (even if it is marked to convert all database NULLs to defaults in Report Options).
    <!break>
    1. Why do you need to execute query the first time with these default parameters, which are later set to the others? We need to make some valid default parameters to make everything work. Also it is not efficient to execute unnecessary query.
    2. If I'm wrong could you explain please? If I'm right, is it a bug and when do you fix it?
    Waiting for answer,
    Anton Stalnuhhin
    Java-developer, Webmedia AS

    .

  • Why do I get a table read error in DB Tools Execute Query.vi

    Hello all,
    I am using LV8 and the database connectivity toolkit.  I can connect to my server database and use the "DB Tools List Tables.vi" to pull the list of tables in the database, but when I try to use an sql command into "DB Tools Execute Query.vi" I get a : Error -2147217911 occurred at Conn Execute.vi->DatabaseTest2.vi message.  In the possible reasons it says : Possible reason(s):
    Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Microsoft Access Driver] Record(s) cannot be read; no read permission on 'tblShopOrders'. in Conn Execute.vi->DatabaseTest2.vi
    I can open and edit this table with MSAccess.
    Any ideas as to the cause of this error?
    Jim
    Jim
    LV 2013

    Hey Andy,
    Since my first post I have discovered a bit more (not enough yet).  Firstly, I can access all of the tables using MSAccess (causing me to assume that I have the necessary permissions).  I am using the "DB Tools Execute Query.vi" with an SQL query and "DB Tools Fetch Recordset Data.vi" objects to try to get data.  I don't get an error when connecting to the database, but the error occurs at the execute query vi.  The database has a large number of tables, and I discovered that I can retrieve data from some of them using the above method.  I looked into the user and group permissions in the MS access security settings and found that the permissions were checked for all of the tables that I could open, and not for the rest.  I checked them on the ones I want to open, but this didn't help.  I went back into Access and made sure that they were still checked and they were.  And that's as far as I have gotten so far.
    Thank you for any help that you can provide.
    Jim
    Jim
    LV 2013

  • Urgent: executeQueryForCollection does not execute query for collection

    Some ViewLink detail views do not refresh when the master RSI navigates.
    Instead, it seems that a cached query collection is used.
    How can we control this behaviour? Under what circumstances does the rowset re-use an old QueryCollection instead of re-executing the query?
    It seems to work for some detail VOs but I cannot find a difference between the working and non-working VLs and VOs.
    This is a duplicate of
    Question about row-level ViewLink refresh
    More information is posted there.
    Thanks,
    Sascha

    Hi Sung,
    thanks for your answer. But I still don't get it.
    It's so erratic.
    I have a worklist with --- say 10 rows.
    Then:
    I navigate to every row and then back to the first row.
    Now I start an integrated application (with its own transaction and database connection) that produces a new detail row.
    I refresh the worklist, navigate back to the row.
    Then I go to the next row and repeat the same.
    Now, sometimes I can do all the stuff after "Then:" 100 times and it works every time. The detail shows the newly added row.
    Sometimes it works just 4 times, then it simply stops working. The newly added rows are not fetched.
    So what's the plan? Why does it work sometimes, and sometimes it doesn't?
    Why does it work for some ViewLinks and not for others?
    Second example: I have a tree binding. The top node has 4 children. Of course, JUTreeBinding uses RL-VLs to build the tree.
    Two of those children detail VOs show the problem all the time, the other two NEVER EVER.
    What's the plan? Why does it work for some VOs and not for the others?
    If this is really by design (I doubt it judging by the flakyness), then that means for us: get rid of ALL ViewLinks and replace them with this listener scheme. Is this really intended? This would be a nightmare. I cannot use VLs and listeners in parallel. How do I know that whether the VL already caused the execution -- this really happens! -- or not?? Is the solution to execute always twice? Where's the reduction in resource consumption then?
    What's the point in caching the query collection of 5 hours ago? Data can change in the DB in the meantime, can it?
    I tried to produce a test application based on Scott/Tiger but failed, because there, the VLs re-executed the query EVERY SINGLE TIME. No matter what changes I made with TOAD in the tables. Is this a bug then???
    And there is no way (setting, property) to control this?
    I am sorry, but I cannot believe that this is really intended. The idea is so ... weird.
    Sascha

  • 5200 : Error in executing  query -- Hyperion Financial Reporting

    Problem in accessing the Hyperion Financial Reports.User is having full access and able to access all the folders except one folder(Legal Folder reports). We are getting 5200: Error Executing the query error. Recently we have upgraded Hyperion to 11.1.1.3 version . Before upgrade user is not facing the problem. After Upgrade user is getting these errors while accessing the reports. we did research and found in "Error 5200: Error Executing Query" When Viewing Financial Reporting (FR) Reports". Is this error is relevant to the Information provided in Metalink and also can you please tell us is there any impact on doing the solution provided in the below. Why is this error is coming is any preferences needs to be changed.Please help us on this.
    Error Description:
    5200: Error executing query
    Servername/ApplicationName/DatabaseName/Error(1007090) Unknown Member name [Current Point of view for years] in Outline Query
    Doc ID 1107142.1:
    Possible Cause 1:
    If members have recently been added, moved, or deleted from the data source, Essbase, HFM, or Planning, the existing User POV records become out of sync.
    The User Point of View record uses indexing to identify the member. If the index changes because of changes in the outline, the User Point of View record no longer points to the correct location in the outline.
    To resolve the issue, you need to run the ManageUserPOV utility on a Windows server that has the Financial Reporting Reports Server, or in a Unix or Linux environment, has the Financial Reporting Print Server installed.
    You will need to provide a BIPlus Global Administrator user ID and password to run the utility.
    The utility will provide the correct syntax to run the command.
    1. In \Hyperion\products\biplus\bin\ManageUserPOV.properties, specify the following parameters:
    a. ReportServer
    b. DatasourceUser
    c. DatasourcePassword
    d. User
    e. Datasource (You can find the datasource in Workspace under Tools>Database Connection Manager in the Name column.)
    2. From the command line, cd to Hyerion\products\biplus\bin
    3. Type in "ManageUserPOV" without the quotes. The executable will read the parameters previously set in the ManageUserPOV.properties file.
    Thanks,
    Naresh.

    Take a look at this: http://adistrategies.com/index.php?loc=knowledge1&item=291
    Hope it helps.
    Mehmet

  • 5200: Error executing query: The data form grid is invalid.

    Hi,
    I am getting this error " 5200: Error executing query: The data form grid is invalid. Verify that all members selected are in Essbase. Check log for details.
    com.hyperion.planning.HspException;hasPovDims=1;povXML=<?xml version="1.0"?><datasources><datasource name="Profit " dsid="228af2c3_129ca3dd85c_-77b1" allowEdit="1"><dim name="Period" dimIndex="1" dsName="Profit " keyDimName="Period" memberName="Apr" displayName="Period: Apr"/><dim name="Year" dimIndex="2" dsName="Profit " keyDimName="Year" memberName="FY10" displayName="Year: FY10"/><dim name="Entity" dimIndex="5" dsName="Profit " keyDimName="Entity" memberName="9999" displayName="Entity: 9999"/></datasource></datasources>"
    I have checked that both the systems essbase and planning are same. nothing's different. still i cannot find the exact reason why the report is not working.
    can any please help me.
    btw, i am using Hyperion Planning 9.3.1
    Thanks,
    BIMS

    Hi
    You probably deleted some members from outline that are used by report
    I would recommend you to open you report/grid via rep.client and try to find which elements are abcent
    Regards
    Alexander
    Edited by: Softperson on 19/8/2010 17:38

  • Execute Query problem in viewing the Image

    Hi all,
    I've created a table with the following command
    Create table test (id Number(5),img_File Blob);
    Now i've created a form, where in the I've placed two fields (id and Img_File). The data type for the Img_File field is Image Item. I'm able to see that it is getting saved.
    I've seen it using the toad that the data is being inserted into the table. When i try to press f7 and then f8(i.e.., Enter Quey, Execute Query). I'm getting the following error.
    ORA-00932: inconsistent datatypes: expected got
    My block is based on the table. I'm using Forms 6i, Windows XP. My doubt is why the error is not showing the datatype (for Ex. Expected Number got date).
    If any one has worked on the Blob, then can suggest me.
    Regards,
    Alok Dubey

    Hi,
    Thanks for your replies. I've used Long Raw data type for the image column. it started get queying.
    i've a doubt that whether it is same in Forms 6i and Forms 10g also(i.e.., Both the versions use the Long for the images). As BLob has more advantages than
    the Long raw. As this is the Oracle recommendation, I want to use Blob. Is there any work around to it.
    Regards,
    Alok Dubey

  • On execute query a save message appears

    hi,
    i have an item which is enabled only when enter_query is pressed. a number is given in that item which then populates the rest of the items of the same datablock when execute_query is pressed. now if i change the item/number then the message appears ' do you want to save changes'. i would like the system message NOT to appear. also i would like for that number/item to be executed. i have wriiten a code for the execute query.
    any help would be nice.
    also thanks in advance for your help.

    i have tried the execute_query(no_validate) but here the form get completely cleared. No_Validate is not even a valid parameter for Execute_Query.
    i would like the same number to be executed when the execute_query pressed the second time.You don't execute a number. Do you mean that you would like the form to re-query using the same number as the query-where input?
    i have written a script for execute_query in the key-exeqry trigger. Why don't you post that code here? It is very likely that whatever you are doing in that script is causing your message to appear.

  • Execute query not workin on application server

    i have upgraded my form to 10.1.2.0.2 successfully and can host them using the application server ....
    in the form i have got various tab canvas,stacked canvas,contect canvas.....
    but my execute query function is not working ...dont know why

    @abdetu...
    hey buddy every thing is working fine now ....
    according to your suggestion i checked the errors...
    and found that some of the columns were not exported properly from the targer database ...
    after adding the database everything started to work perfectly fine
    once again thnx a lot for ur help and time

  • When executing query...in the result i want to display each row values

    Hi All,
    When executing query...in the result area i want to display  each row values.
    Example:  query result is like this
    Business Area   Sales   Material 
    kh02                 1000      2000
                            2000       300
                            5000        400
                            6990       1000
    Kh03                1400        700
                             200        500
                              50          60
    but i need like this
    kh02               1000         2000
    kh02                500           600
    kh02                400           300
    kh03                1400         700
    kh03               200            500
    Why i need like this because am exporting to Excel spread sheet and i have to send as i show above ....i am doing manual but the file is very big like 95, 969 records i have to change manual...like this i have to change 8 files.
    please advice me easy way
    i willl be very gr8ful
    Thanks
    sidhartha

    Hi,
    that'S exactly what hide repeated key values does. If this option is on your result is:
    Kh02 1000 1500
    blank 500 456
    blank 600 700
    kh03 400 500
    balnk 500 600
    If you turn it off, the result will be:
    Kh02 1000 1500
    Kh02 500 456
    kh02 600 700
    kh03 400 500
    kh03 500 600
    Exaclty what you want. Try it, it should work
    Regards,
    Juergen

  • Collection: (80004005) Execute: Query timed-out

    Hi,
    Recent days im facing a strange issue like the SCCM clients are not reporting the full Software inventory, so because of that we were unable to query using the software inventory details.
    The strange part is, while checking the logs "Inventory agent.log" it states "Collection: (80004005) Execute: Query timed-out".
    I wanna find what is the job of the Software inventory cycle and how to see at what point they stuck scanning...
    Any information helping me to proceed further with my investigation would be much appreciated.
    Thanks,
    Nana

    Thanks for the link Garth...
    We have scheduled software inventory to run on Sundays so that it should not impact client PC's performance. I agree it takes long time, but at some point we might require some information from those files. I also tried to create few test machine, but its difficult
    to duplicate this issue in them. Whenever we create a new machine, it reports good :(
    I was querying the machines who has collected "powershell.exe" files using software inventory cycle, i was able to fetch about 91% of the machines where as 9% has not. I tried to run a powershell query (Full software inventory) remotely on the machine where
    we are facing issues collecting software inventory. Monitoring the logs and i came up with this error.
    Here my question would be as its working on most of the machines why aren't they good on the rest. Even if we try to re-install the client, same status. Maybe because of the machine performance?
    Thanks for your help...

  • Execute query without navigation

    hi all,
    My problem today that I want to execute query without navigation.
    I create a global variable
    (:global.usr := :block.username;)
    as you see the global variable takes the value of the current user accessing the system.
    I want the user to be able to change his password without any privilage to see the other users.
    when_new_form_instance
    execute_query;
    that what I did but what I want is to restrict his access only according to the value in the global variable

    I tryed to run the following code but I dont know why the condition in the else clause always execute.     
    if :global.usr = :global.usr = upper('ADMIN') or
         :global.usr = upper('SYS_ADMIN') then
         set_block_property('SYS_USER', DEFAULT_WHERE, '');
         execute_query;
         else
                   set_block_property('SYS_USER', DEFAULT_WHERE, 'USER_NAME = :global.usr');
                   execute_query;
         end if;

  • 0ADHOC web template - How do I execute query views?

    Friends,
    I am using 0adhoc web template as default.  After executing a query I use drill downs and change output and then I click on save view and fill in all the required fields. I can find all those query views in BEx analyzer but not on web report. How do I execute query views from web report?
    Thanks in advance.
    Message was edited by:
            BJ P

    Thanks for your input. My users are using save view option on web report and they want to run previously saved views.  There should be a way otherwise why would they put save view option.
    Any suggestions??????

  • Log the query of the "Execute Query Task"

    Hi,
    I want to log/watch the query executed by the "Execute query Task". It's a query  with different variables, the different variables i can see in one of the debug windows and these looks OK, but the query doesn't do what's expected. So i want to see the whole query, is that possible?
    Query logging on the database server isn't an option. The server is an oracle server and the dba doesn't want to change this setting.
    Thanks,
    Dennis

    You could use a single variable to store your entire query, and use that in your Execute SQL task. Basically, you need to set the variable to evaluate as an expression, then build your query string in the variable. You can use this to combine your
    other variables into the query, and see it as one value at runtime.
    I am using SSIS 2008. I know I can do it with a variable. But I was wondering why SSIS does not allow you to log the query easily. Just for this, I will have to create a variable and a script task :(

Maybe you are looking for

  • How can I speed up my MacBook Air?

    Hi folks, My MacBook Air has gotten painfully slow over time but I can't afford to buy a new one right now. It freezes for a few seconds at a time, all the time, especially when I am using Chrome.* Any ideas for how to speed it up?  Specs are: Model:

  • My Hard disk is full, and I can't find what did it.

    I just recently purchased a 1080p sony handycam with AVCHD formatting and made a video in iMovie. The video was 30 minutes long and the raw event footage I used to make it up almost filed my hard drive. I went from 200gb to 20gb rather quickly, so I

  • Upload of BP Data using DTW

    Hi, I tried to upload the BP data in one of the databases using DTW. I was able to upload the masters successfully but was not able to upload the bill to and ship to addresses for the BP data. Data which had special characters like , or  hyphen appea

  • Reports with FLOAT data  type

    I am trying to create a simple report form from a table which contains a FLOAT data column. I follow these steps: New>Component>Report>Report with Form... I end up with 2-pages: the report and the entry form to update/create a row. The key-column on

  • BaseSystem pkg

    Hi I visited a friend today who runs OS X 10.4.11. on an iMac G5 PPC. He couldn't get Disk Utility to work as it told him it couldn't find valid package. I hadn't seen this before so checked online. Apparently, in Macintosh HD > Library > Receipts th