Duplicate iterators on range paging VOs

Hi all,
For performance reasons we want to use range paging VOs for our application. We have logic where we need to create duplicate iterators on VOs to compute some values. But when access mode of VOs is not scrollable we are getting exceptions that duplicate iterators and rowsets cannot be created. Any suggestions on how to overcome this problem, both in managed beans and in BC code ?
-Ramku

Thanks Dimitris for your reply.
Yes. createRowSetIterator("") throws JBO-25083: Cannot create a secondary iterator on row set {0} because the access mode is forward-only or range-paging.
Is there a way to change access mode of VO programatically or some trick to work around this problem ?
-Ramku

Similar Messages

  • Error in ADF View Object Range Paging ?

    Hi all,
    I've used the range paging technique (similar to the paging action example posted by Steve Muench). It works for most cases. However, I found a strange behaviour with getEstimatedRangePageCount call as described below :
    e.g.
    VOs on Table A(key1) -> Table B (key1, key2, fld1) with records of table B:
    k1, 1, 'ABC'
    k2, 1, 'BCD'
    k2, 2, 'CDE'
    k2, 3, 'EFG'
    k3, 1, 'DBCD'
    k3, 2, 'DCDE'
    k3, 3, 'EEFG'
    k3, 4, 'EFFG'
    RangeSize of table B = 1
    There are 2 screens : one is master/detail screen and another search screen to pass key1 to the master/detail screen
    The JSP screen is master(table A) with navigation buttons on detail (table B)
    The sequence of actions are as follows :
    1. search screen with key1=k2
    2. display m/d screen with key1 = k2 (getEstimatedRangePageCount return 3)
    3. go back to search screen and set key1=k3
    4. display m/d screen wtih key1 = k3 (getEstimatedRangePageCount return 4)
    5. go back to search screen and set key1=k1
    6. display m/d screen wtih key1 = k1 (getEstimatedRangePageCount return 1)
    7. go back to search screen and set key1=k3
    8. display m/d screen wtih key1 = k3 (getEstimatedRangePageCount return 1 instead of 4)
    9. go back to search screen and set key1=k3
    10. display m/d screen wtih key1 = k3 (getEstimatedRangePageCount return 4)
    Does anyone know what happen or how can it be solved ?
    Thanks,
    Nelson.

    Repost.
    Can anyone help ?
    Regards,
    Nelson.

  • ADF BC: range paging on dynamic view object

    hi!
    i have a dynamically generated sql query and i want to get the results one page at a time. for this to work i create at runtime a view object and try to use range paging:
    String sql = "SELECT ...";
    ViewObject vo = appModule.createViewObjectFromQueryStmt("tmpVO"+System.currentTimeMillis(), sql);
    vo.setRangeSize(pageSize);
    vo.setAccessMode(RowSet.RANGE_PAGING);
    vo.scrollToRangePage(pageNo);
    vo.getEstimatedRowCount();
    Row[] rows = vo.getAllRowsInRange();
    vo.remove();
    but when i run this it was pretty slow. so i traced the database session and saw that the executed query was the sql string, not the range paging select (SELECT * FROM (SELECT /*+ FIRST_ROWS */ IQ.*, ROWNUM AS Z_R_N FROM (...).
    i use range paging on other view objects that are not dynamically generated and it works fine. please tell me what can i do to get only the specified page from the data base.
    thank you
    Edited:
    here is the select i run:
    SELECT UnitEO.UNIT_TYPE, UnitEO.UNIT_NR,
    UnitTypeEO.USER_UNIT_TYPE,
    UnitEO.UNIT_NR UNIT_NUMBER,
    UnitEO.NUMBER_PLATE_ID,
    AreaEO.AREA_NAME,
    UnitEO.SERIAL_NR
    FROM NW_UNIT UnitEO,
    NW_UNIT_DETAILS NwUnitDetailsEO,
    NW_UNIT_TYPE UnitTypeEO,
    NW_AREA AreaEO,
    NW_COMMUNICATION_COMPUTER ComputerEO
    WHERE
    UnitEO.deleted IS NULL
    AND UnitEO.UNIT_NR = NwUnitDetailsEO.UNIT_NR (+)
    AND UnitEO.UNIT_TYPE = NwUnitDetailsEO.UNIT_TYPE (+)
    AND UnitEO.UNIT_TYPE = UnitTypeEO.UNIT_TYPE
    AND UnitEO.AREA_ID = AreaEO.AREA_ID (+)
    AND UnitEO.COMPUTER_ID = ComputerEO.COMPUTER_ID (+)
    here is the jbo.debugoutput that was generated; it includes the creation of the app module, the execution of SearchEntityPkVO (a predefined vo, not paged), then the execution of the code above:
    08/07/22 13:56:52 [436] Connected to Oracle JBO Server - Version: 10.1.3.36.73
    08/07/22 13:56:52 [437] mPCollUsePMgr is false
    08/07/22 13:56:52 [438] ViewObjectImpl.mDefaultMaxRowsPerNode is 70
    08/07/22 13:56:52 [439] ViewObjectImpl.mDefaultMaxActiveNodes is 30
    08/07/22 13:56:52 [440] Created root application module: 'enermet.aim.search.model.SearchAppModule'
    08/07/22 13:56:52 [441] Locale is: 'en_US'
    08/07/22 13:56:52 [442] ApplicationPoolImpl.resourceStateChanged wasn't release related. No notify invoked.
    08/07/22 13:56:52 [443] Oracle SQLBuilder: Registered driver: oracle.jdbc.driver.OracleDriver
    08/07/22 13:56:52 [444] Creating a new pool resource
    08/07/22 13:56:52 [445] Trying connection/2: url='jdbc:oracle:thin:@AIMTEST:1521:AIM' ...
    08/07/22 13:56:53 [446] Successfully logged in
    08/07/22 13:56:53 [447] JDBCDriverVersion: 10.1.0.5.0
    08/07/22 13:56:53 [448] DatabaseProductName: Oracle
    08/07/22 13:56:53 [449] DatabaseProductVersion: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production With the Partitioning, OLAP and Data Mining options
    08/07/22 13:56:53 [450] <AM MomVer="0">
    <cd/>
    <CONN/>
    </AM>
    08/07/22 14:00:21 [985] SearchEntityPkVO>#q old SQLStmtBufLen: 234, actual=163, storing=223
    08/07/22 14:00:21 [986] select sep.pk_name, sep.position
    from MD_SEARCH_ENTITY_PK sep
    inner join MD_SEARCH_ENTITIES se
    on se.entity_id = sep.entity_id
    where se.name = :VarEntityName
    08/07/22 14:00:21 [987] ViewObject: SearchEntityPkVO Estimated Row Count Query Statement:
    08/07/22 14:00:21 [988] "SELECT count(1) FROM (select sep.pk_name, sep.position
    from MD_SEARCH_ENTITY_PK sep
    inner join MD_SEARCH_ENTITIES se
    on se.entity_id = sep.entity_id
    where se.name = :VarEntityName) "
    08/07/22 14:00:21 [989] Bind params for ViewObject.getQueryHitCount: SearchEntityPkVO
    08/07/22 14:00:21 [990] Binding param "VarEntityName": Unit
    08/07/22 14:00:21 [991] ViewObject: SearchEntityPkVO Estimated Row Count: 2
    08/07/22 14:00:21 [992] Clear QueryCollection in cache for VO tmpVO1216724421562
    08/07/22 14:00:21 [993] ViewObject: tmpVO1216724421562 close prepared statements...
    08/07/22 14:00:21 [994] tmpVO1216724421562>#q computed SQLStmtBufLen: 641, actual=601, storing=631
    08/07/22 14:00:21 [995] SELECT UnitEO.UNIT_TYPE, UnitEO.UNIT_NR,
    UnitTypeEO.USER_UNIT_TYPE,
    UnitEO.UNIT_NR UNIT_NUMBER,
    UnitEO.NUMBER_PLATE_ID,
    AreaEO.AREA_NAME,
    UnitEO.SERIAL_NR
    FROM NW_UNIT UnitEO,
    NW_UNIT_DETAILS NwUnitDetailsEO,
    NW_UNIT_TYPE UnitTypeEO,
    NW_AREA AreaEO,
    NW_COMMUNICATION_COMPUTER ComputerEO
    WHERE
    UnitEO.deleted IS NULL
    AND UnitEO.UNIT_NR = NwUnitDetailsEO.UNIT_NR (+)
    AND UnitEO.UNIT_TYPE = NwUnitDetailsEO.UNIT_TYPE (+)
    AND UnitEO.UNIT_TYPE = UnitTypeEO.UNIT_TYPE
    AND UnitEO.AREA_ID = AreaEO.AREA_ID (+)
    AND UnitEO.COMPUTER_ID = ComputerEO.COMPUTER_ID (+)
    08/07/22 14:00:21 [996] *** createViewAttributeDefImpls: oracle.jdbc.driver.T4CPreparedStatement@4e6
    08/07/22 14:00:21 [997] Bind params for ViewObject: tmpVO1216724421562
    08/07/22 14:00:21 [998] Clear QueryCollection in cache for VO tmpVO1216724421562
    08/07/22 14:00:21 [999] ViewObject: tmpVO1216724421562 close prepared statements...
    08/07/22 14:00:21 [1000] Column count: 7
    08/07/22 14:00:21 [1001] tmpVO1216724421562>#q computed SQLStmtBufLen: 641, actual=601, storing=661
    08/07/22 14:00:21 [1002] SELECT UnitEO.UNIT_TYPE, UnitEO.UNIT_NR,
    UnitTypeEO.USER_UNIT_TYPE,
    UnitEO.UNIT_NR UNIT_NUMBER,
    UnitEO.NUMBER_PLATE_ID,
    AreaEO.AREA_NAME,
    UnitEO.SERIAL_NR
    FROM NW_UNIT UnitEO,
    NW_UNIT_DETAILS NwUnitDetailsEO,
    NW_UNIT_TYPE UnitTypeEO,
    NW_AREA AreaEO,
    NW_COMMUNICATION_COMPUTER ComputerEO
    WHERE
    UnitEO.deleted IS NULL
    AND UnitEO.UNIT_NR = NwUnitDetailsEO.UNIT_NR (+)
    AND UnitEO.UNIT_TYPE = NwUnitDetailsEO.UNIT_TYPE (+)
    AND UnitEO.UNIT_TYPE = UnitTypeEO.UNIT_TYPE
    AND UnitEO.AREA_ID = AreaEO.AREA_ID (+)
    AND UnitEO.COMPUTER_ID = ComputerEO.COMPUTER_ID (+)
    08/07/22 14:00:21 [1003] ViewObject: tmpVO1216724421562 Estimated Row Count Query Statement:
    08/07/22 14:00:21 [1004] "SELECT count(1) FROM (SELECT UnitEO.UNIT_TYPE, UnitEO.UNIT_NR,
    UnitTypeEO.USER_UNIT_TYPE,
    UnitEO.UNIT_NR UNIT_NUMBER,
    UnitEO.NUMBER_PLATE_ID,
    AreaEO.AREA_NAME,
    UnitEO.SERIAL_NR
    FROM NW_UNIT UnitEO,
    NW_UNIT_DETAILS NwUnitDetailsEO,
    NW_UNIT_TYPE UnitTypeEO,
    NW_AREA AreaEO,
    NW_COMMUNICATION_COMPUTER ComputerEO
    WHERE
    UnitEO.deleted IS NULL
    AND UnitEO.UNIT_NR = NwUnitDetailsEO.UNIT_NR (+)
    AND UnitEO.UNIT_TYPE = NwUnitDetailsEO.UNIT_TYPE (+)
    AND UnitEO.UNIT_TYPE = UnitTypeEO.UNIT_TYPE
    AND UnitEO.AREA_ID = AreaEO.AREA_ID (+)
    AND UnitEO.COMPUTER_ID = ComputerEO.COMPUTER_ID (+)
    08/07/22 14:00:21 [1005] Bind params for ViewObject.getQueryHitCount: tmpVO1216724421562
    08/07/22 14:00:26 [1006] ViewObject: tmpVO1216724421562 Estimated Row Count: 32732
    08/07/22 14:00:26 [1007] Column count: 7
    08/07/22 14:00:26 [1008] ViewObject: tmpVO1216724421562 Created new QUERY statement
    08/07/22 14:00:26 [1009] tmpVO1216724421562>#q old SQLStmtBufLen: 661, actual=601, storing=631
    08/07/22 14:00:26 [1010] SELECT * FROM (SELECT /*+ FIRST_ROWS */ IQ.*, ROWNUM AS Z_R_N FROM (SELECT UnitEO.UNIT_TYPE, UnitEO.UNIT_NR,
    UnitTypeEO.USER_UNIT_TYPE,
    UnitEO.UNIT_NR UNIT_NUMBER,
    UnitEO.NUMBER_PLATE_ID,
    AreaEO.AREA_NAME,
    UnitEO.SERIAL_NR
    FROM NW_UNIT UnitEO,
    NW_UNIT_DETAILS NwUnitDetailsEO,
    NW_UNIT_TYPE UnitTypeEO,
    NW_AREA AreaEO,
    NW_COMMUNICATION_COMPUTER ComputerEO
    WHERE
    UnitEO.deleted IS NULL
    AND UnitEO.UNIT_NR = NwUnitDetailsEO.UNIT_NR (+)
    AND UnitEO.UNIT_TYPE = NwUnitDetailsEO.UNIT_TYPE (+)
    AND UnitEO.UNIT_TYPE = UnitTypeEO.UNIT_TYPE
    AND UnitEO.AREA_ID = AreaEO.AREA_ID (+)
    AND UnitEO.COMPUTER_ID = ComputerEO.COMPUTER_ID (+)
    ) IQ WHERE ROWNUM < :0) WHERE Z_R_N > :1
    08/07/22 14:00:26 [1011] Bind params for ViewObject: tmpVO1216724421562
    08/07/22 14:00:26 [1012] setting rownum query between (0, 23)
    08/07/22 14:00:26 [1013] ViewObject: tmpVO1216724421562 close prepared statements...
    PS: I am using JDev 10.1.3.36.73

    You have a couple of choices. You could create one view object with a bind variable parameter(s) and in the application module you have 10 instances of that VO with appropriate values set for the bind variable in each instance.
    Or if you are using the LOV feature of a VO then you can set an attribute to point to one VO and then using a view cirteria applied to that specific LOV you can then "filter" the data that would appear in that LOV.
    Does that help?
    Grant Ronald

  • Issue with ADF table range paging and sorting

    Hello,
    We have a requirement to support pagination in ADF tables. For this, we have made use of Range paging access mode in the view object level. The paging works perfectly fine with this. But we have another requirement of letting the user do a sort on the table (Yes!! The paginated table). The sort should be applied on all rows in the db and the control should return to the first row.
    Applying sort as it is provided by the fwk, sorts the records in the obtained range only. So we have over ridden the Sort listener in Managed bean for this and are able to acheive the sorting of all rows through a AM method call. We are seeing a problem after this. If the sort action is applied to the key attribute then the previous and next range navigation works fine. If the same action is applied to non-key field, then some times (yea!! This is not consistent) the next set is not fetched.
    Here is the code snippet that is called on Next navigation:
    Map<String,Object> pfScope = AdfFacesContext.getCurrentInstance().getPageFlowScope();
    Object objPageNumber = pfScope.get("pageNumber");
    int pageNumber = 0;
    if(null != objPageNumber)
    pageNumber = new Integer(objPageNumber.toString()).intValue();
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    JUCtrlRangeBinding view = (JUCtrlRangeBinding)bindings.getControlBinding("GeDmRequestVO");
    int iRange = getTable().getAutoHeightRows();
    int currentPage = view.getIteratorBinding().getNavigatableRowIterator().getRangeStart()/(iRange + 1);
    System.out.println("Before " + view.getIteratorBinding().getNavigatableRowIterator().getRangeStart());
    System.out.println("Current : " + currentPage);
    System.out.println("Page Number : " + pageNumber);
    System.out.println("Range : " + iRange);
    System.out.println("Value : " + iRange*(currentPage + pageNumber));
    view.getIteratorBinding().getNavigatableRowIterator().scrollRange(iRange*pageNumber);
    System.out.println("After " + view.getIteratorBinding().getNavigatableRowIterator().getRangeStart());
    Although, the new values are not refreshed in the table, the SOPs for before and after print the proper range sizes. And as I mentioned above, the above code works perfectly fine if there is no sort applied or when key attribute is sorted.
    Would appreciate your help on this regard with navigation after non-key attribute sort.
    Thanks,
    Chitra.

    Hi Chitra,
    Can you specify some links to implement RangePaging.....We need to implement pagination.If possible can you share the code or specify the steps how you achieved it.
    Thanks

  • Problems using writeXML on Range Paging ViewObject

    We have a ViewObject configured to work with Range Page feature (it has up to 150 thousand rows), it works very nicely, fast and fine.
    But the problem appears when we try to use the writeXML functionality on this Range Paging ViewObject, and exception is thrown, seems that writeXML calls any other rowset method than next().
    Any suggestion about how to solve this problem? (without disabling range paging feature on the ViewObject).
    Thanks in advanced.
    The thrown exception is:
    oracle.jbo.InvalidOperException: JBO-25011: El juego de filas <ViewObjectName> sólo permite desplazarse hacia delante.
         at oracle.jbo.server.ViewRowSetImpl.createViewRowSetIterator(ViewRowSetImpl.java:811)
         at oracle.jbo.server.ViewRowSetImpl.createRowSetIterator(ViewRowSetImpl.java:794)
         at oracle.jbo.server.RowSetImpl$1$RSIEnumeration.<init>(RowSetImpl.java:247)
         at oracle.jbo.server.RowSetImpl.getRowsEnumerator(RowSetImpl.java:259)
         at oracle.jbo.server.RowSetImpl.getXMLElementNode(RowSetImpl.java:147)
         at oracle.jbo.server.ViewObjectImpl.appendXMLElementNodes(ViewObjectImpl.java:9805)
         at oracle.jbo.server.ViewObjectImpl.writeXML(ViewObjectImpl.java:9707)

    Eliseu -
    Unfortunately with the forum software not escaping any XML content, I'm having a real hard time figuring out what kind of problem you are having with detail disclosure. I did post a response to your message in the UIX forum:
    Problems with details disclosure
    You might want to check out my response and post any follow-ups there...
    Andy

  • Range Paging rownum question

    I am using JDeveloper 11.1.1.3.0 and I have a question about the range paging access mode and I went through some docs but couldn't get myself to answer all the questions I have.
    1. In the VO's I set the Access Mode to Range Paging and set the Range Size to 25 but I only have (at this time) 19 rows. But in the logs, I notice:
    "<OracleSQLBuilderImpl><bindRangePagingParams> [2540] setting rownum query between (0, 28)"
    which doesn't make sense. Firstly, 0-28 is not a 25 row range and secondly, why is the SQL even accessing anything outside the range of 25 when there are only 19 rows for the VO?
    2. Also, I have two buttons on the page (page fragment #1) which performs operations (add a new row, version an existing row) by having the user go to a different page fragment (page fragment #2). After the user submits the info and returns to the original page (page fragment #1), I see this message in a pop-up:
    "Cannot navigate with unposted rows in a RangePaging RowSet"
    which, although not an error, doesn't make sense because the info was saved in the DB.
    Hope my questions make sense.

    I don't have the url reference handy for the "official" word, but I recall that jdev overfetches 3 records in range paging mode.
    It's not known that there are only 19 records until the first batch is fetched, which is why you see 0-28.
    Just noticed the second question - no comment on that one, unfortunately ;)
    John

  • Issue using Range Paging Incr in  VO performance tuning

    Hi All,
    I have a View Object, where I have given the following tuning conditions
    1. All rows option with Batch Size - 250 (As Needed)
    2. Query Optimizer - FIRST_ROWS_250
    3. Access Mode Range Paging Incremental with Range Size - 50 and cache factor - 5
    Now when I run my application, I am getting the following error
    *<OracleSQLBuilderImpl> <bindRangePagingParams> [36909] setting rownum query between (1200, 1453)*
    *<ViewRowSetIteratorImpl> <scrollRange> [36910] oracle.jbo.common.JboAssert: (Assertion Failed) mSize < 0 after range page adjustment of mSize.*
    *     at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:302)*
    *     at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:325)*
         at oracle.jbo.server.ViewRowSetIteratorImpl.scrollRange(ViewRowSetIteratorImpl.java:1346)
         at oracle.jbo.server.ViewRowSetIteratorImpl.setRangeStartWithRefresh(ViewRowSetIteratorImpl.java:2729)
         at oracle.jbo.server.ViewRowSetIteratorImpl.setRangeStart(ViewRowSetIteratorImpl.java:2714)
         at oracle.jbo.server.ViewRowSetImpl.setRangeStart(ViewRowSetImpl.java:2924)
         at oracle.jbo.server.ViewObjectImpl.setRangeStart(ViewObjectImpl.java:10099)
         at oracle.adf.model.binding.DCIteratorBinding.setRangeStart(DCIteratorBinding.java:3419)
         at oracle.adfinternal.view.faces.model.binding.RowDataManager._bringInToRange(RowDataManager.java:103)
         at oracle.adfinternal.view.faces.model.binding.RowDataManager.setRowIndex(RowDataManager.java:58)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.setRowIndex(FacesCtrlHierBinding.java:603)
         at oracle.adfinternal.view.faces.renderkit.rich.TreeRendererUtils.computeCurrentContainerRowCount(TreeRendererUtils.java:2070)
         at oracle.adfinternal.view.faces.renderkit.rich.TreeRendererUtils.getCurrentContainerRowCount(TreeRendererUtils.java:2042)
    Additional Info:
    1. In VOIterator in Page def file I have given Range Size as 50 and in table fetchSize="#{bindings.MscOrdersVO11.rangeSize}"
    2. I ran the sql from VO in DB and found the row count to be 1264.
    Can some one please let me know where I am going wrong here.
    Thanks in advance.
    Ragu

    Hi Timo,
    Jdev Version - 11.1.1.4.0
    Also I tried using Range Paging and I am getting Missing IN or OUT parameter at index:: 9 issue. But the other issue
    "oracle.jbo.common.JboAssert: (Assertion Failed) mSize < 0 after range page adjustment of mSize" did not appear.
    IQ  WHERE ROWNUM < :Bind_RangePage_High) WHERE Z_R_N > :Bind_RangePage_Low) "
    *<ViewObjectImpl> <getQueryHitCount> [35841] Bind params for ViewObject.getQueryHitCount: MscOrdersVO1*
    *<ViewRowSetImpl> <doSetWhereClauseParam> [35842] MscOrdersVO1 ViewRowSetImpl.doSetWhereClause(-1, vPlanId, 15320)*
    *<ViewRowSetImpl> <doSetWhereClauseParam> [35843] MscOrdersVO1 ViewRowSetImpl.doSetWhereClause(-1, vPlanId1, null)*
    *<ViewRowSetImpl> <doSetWhereClauseParam> [35844] MscOrdersVO1 ViewRowSetImpl.doSetWhereClause(-1, vBasePlanId, 15320)*
    *<ViewRowSetImpl> <doSetWhereClauseParam> [35845] MscOrdersVO1 ViewRowSetImpl.doSetWhereClause(-1, vBasePlanId1, 0)*
    *<OracleSQLBuilderImpl> <bindParamValue> [35846] Binding param "vPlanId": 15320*
    *<OracleSQLBuilderImpl> <bindParamValue> [35847] Binding null of type 12 for "vPlanId1"*
    *<OracleSQLBuilderImpl> <bindParamValue> [35848] Binding param "vBasePlanId": 15320*
    *<OracleSQLBuilderImpl> <bindParamValue> [35849] Binding param "vBasePlanId1": 0*
    *<ViewObjectImpl> <getQueryHitCount> [35850] ViewObjectImpl.getQueryHitCount failed...*
    *<ViewObjectImpl> <getQueryHitCount> [35851] java.sql.SQLException: Missing IN or OUT parameter at index:: 9*
    *     at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1821)*
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3625)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
         at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:135)
         at oracle.jbo.server.ViewObjectImpl.getQueryHitCount(ViewObjectImpl.java:4523)
         at oracle.jbo.server.ViewObjectImpl.getQueryHitCount(ViewObjectImpl.java:4437)
    Thanks,
    Ragu
    Edited by: 867250 on Jul 26, 2012 5:58 AM
    Edited by: 867250 on Jul 26, 2012 5:58 AM

  • Range Paging Feature

    anyone tried the new Range Paging Feature in 9.0.5 preview version? it works well?
    i try to fecth rows in sets of 10 and when i need more i make a scrollRange(),setRangeStart(),...
    in SCROLLABLE mode this works well but in RANGE_PAGING mode this only returns 2 pages, i can't go to the third page (the range size is 10 and i have 20000 rows in database).
    how can i count the rows? now this.getRowSet().getRowCount(); don�t work because rows are not in the RowSet
    any help?
    thanks

    scrollRange (+/- rowCount) should scroll the 'rowCount' number of rows. You may also use scrollToRangePage method and pass in index of which page to jump to.
    getRowCOunt() will return the count of rows in the cache and in case of range paging that should be range size + some buffered rows. You may use getEStimatedRowCOunt() to get the valid row count.

  • Named View Criteria and Range paging don't work together

    Hi,
    I am using a named view criteria for a view whose access mode is set to range paging.
    When I use the named view criteria on my page to do a search I am getting the below error. If I don't use range paging as access mode for the view I don't get this error. Looks like when I use the search it doesn't pass the row numbers properly and they are not set in the query.
    Is this a known issue or am I missing something?
    Thanks
    SQL error during statement preparation.  Statement: Select *
      From (Select /*+ FIRST_ROWS */
             IQ.*, ROWNUM As Z_R_N
              From (Select Persons.PRINCIPAL_NAME,
                           Persons.PERSON_ID,
                           Persons.TITLE,
                           Persons.FIRST_NAME,
                           Persons.LAST_NAME,
                           Persons.PHONE_NUMBER
                      From PERSONS Persons
                     Where ((((UPPER(Persons.FIRST_NAME) Like UPPER('%' || :p_name || '%')) Or (:p_name Is Null))))) IQ
             Where ROWNUM < :1)
    Where Z_R_N > :2
    Missing IN or OUT parameter at index:: 4 Message was edited by:
    Muhammed Soyer

    Hi Frank,
    I didn't test it in 10g. It was something that I came across and thought that it might be a known issue..
    The query is not something that I built manually. My entity is created from a table and my view is using the entity. I added a Named Criteria to the view and used Range Paging as access mode for the view.
    The actual query is this
    SELECT Persons.PRINCIPAL_NAME,
           Persons.PERSON_ID,
           Persons.TITLE,
           Persons.FIRST_NAME,
           Persons.LAST_NAME,
           Persons.PHONE_NUMBER
    FROM PERSONS Persons

  • JClient: Range Paging

    We try to use the range paging feature of 9.0.5.1 with a JTable. The API doc isn't very helpful on this subject.
    Is there any example code on using range paging with JClient ?
    We used setRangeSize(), scrollRange() on the view object. With acces mode SCROLLABLE we face following effect: JTable seems to be filled with all rows of the query result, but only the data of the rows in the range are visible. All other rows are existing but are empty. This is a strange behavior and not very useful.
    With access mode RANGE_PAGING we got following exception on executeQuery(), but the query is correct and runs with access mode SCROLLABLE:
    class oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.
    =================================================================
    oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:760)
    oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:521)
    oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3200)
    oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:597)
    oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:700)
    oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:638)
    oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3147)
    autefa.apis.screens.product.ProductData.refresh(ProductData.java:442)
    autefa.apis.screens.product.SelectionPanel.refresh_btn_actionPerformed(SelectionPanel.java:791)
    autefa.apis.screens.product.SelectionPanel.access$5000471(SelectionPanel.java:33)
    autefa.apis.screens.product.SelectionPanel$14.actionPerformed(SelectionPanel.java:423)
    javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
    javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
    javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
    java.awt.Component.processMouseEvent(Component.java:5100)
    java.awt.Component.processEvent(Component.java:4897)
    java.awt.Container.processEvent(Container.java:1569)
    java.awt.Component.dispatchEventImpl(Component.java:3615)
    java.awt.Container.dispatchEventImpl(Container.java:1627)
    java.awt.Component.dispatchEvent(Component.java:3477)
    java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
    java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
    java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
    java.awt.Container.dispatchEventImpl(Container.java:1613)
    java.awt.Component.dispatchEvent(Component.java:3477)
    java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    Any idea or a working example ? Thanks.

    Repost

  • Creating duplicate for date range

    Hi folks,
    How to duplicate date range to other temporary one.
    eg.,
    r_wadat[] = s_wadat[]
    it throws error
    how to do that.
    thanx
    rao

    Hi hemam,
    1. Ideally it should not give any error, provided the declaration is correct.
    2.
    report abc.
    ranges : r1 for sy-datum.
    ranges : r2 for sy-datum.
    r2[] = r1[].
    regards,
    amit m.

  • SetFetchMode and Range Paging

    I'm trying to improve performance in the (first) BC4J application that we have written. I'm not clear about the difference between the 'FetchMode' (which can be set programmatically or in the View Object Editor to, 'as needed', 'all at once' etc.) and the call vo.setAccessMode(RANGE_PAGING);
    Is it that the RANGE_PAGING 'AccessMode' will actually cause a different query to run against the database (to retrieve rows in a given range) whereas 'FetchMode' controls how rows are fetched from the query results ?
    If would be gratefull if anyone could help me clear up my understanding of this.

    I'm interested too.
    Tks
    Tullio

  • BC4J Range Paging

    Hi all,
    I am trying to figure out a way of paging through a large set of rows in a view object without loading all the rows into the cache. In BC4J 9.0.4 there seems to be a new API (as described in http://radio.weblogs.com/0118231/stories/2003/01/26/quickOverviewOfNewBc4j904RangePagingFeature.html). However, we are using 9.0.3. Is there any way to have this functionality without implementing it manually (e.g. by setting ROWNUM in the query)?
    Thanks for any hint!
    Markus.

    Hi,
    I have a UIX page which shows 10 members per page. As we are getting "Out of memory" error for one of our clients because of large data, I have enabled RANGE_PAGING feature for that page, followed all the procedures like:
    1. All Rows in Batches of : 13
    2. Checked Passivate State
    3. In the Application module, overridden the method - "PrepareSession"
    with the following code:
    ViewObjectImpl vo = getMemInfoViewMemSearchPage1();
    vo.setAccessMode(RowSet.RANGE_PAGING);
    When I first go to the page, it is showing 10 members out of the entrie count with 1-10 of 30000. But when I click "Next", it is just showing 3.
    By this I believe it is not executing the query for the second set and if I explicitly call the execute Query on View Object, I believe paging may not work.
    I would really appreciate anyone's help in this regard.
    Thanks
    Venkat

  • Example #31 (JClient JTable Using Range Paging Mode) problem?

    Hi,
    JClient 10.1.2
    When you run the example and activate the last record button to begin with, the next set button doesn't do nothing anymore?
    Is this a normal behaviour?
    Thanks
    Frederic

    repost

  • Problem with range page with SQL Server

    Please help
    JDev version JDEVADF_11.1.1.7.0_GENERIC_130226.1400.6493
    I am using range paging for one of the VOs. The VO is based on single table. The VO is bounded to af:table. We need to support both Oracle and SQL server.
    When database is Oracle , the range paging works fine.
    But when database is SQLServer only first page is fetched properly, all the other pages are just copy of first page. The pagesize is default (25).
    Did I miss anything ?
    With accessMode=Scrollable the table show correct data for both Oracle and SQLServer.
    This is my VO XML
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="MessagesROVO"
      Version="11.1.1.64.93"
      InheritPersonalization="true"
      OrderBy='"TIMESTAMP" desc'
      BindingStyle="JDBC"
      CustomQuery="true"
      RowClass="model.bc4j.queries.admin.MessagesROVORowImpl"
      ComponentClass="model.bc4j.queries.admin.MessagesROVOImpl"
      FetchMode="FETCH_AS_NEEDED"
      PageIterMode="Full"
      UseGlueCode="false"
      Passivate="All"
      AccessMode="RANGE_PAGING">
      <DesignTime>
        <Attr Name="_codeGenFlag2" Value="Access|Coll|VarAccess"/>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="model.bc4j.queries.admin.MessagesROVO_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <Variable
        Name="BINDApplicationName"
        Kind="viewcriteria"
        Type="java.lang.String">
        <AttrArray Name="ExtendedDataInts">
          <Item Value="0"/>
        </AttrArray>
      </Variable>
      <Variable
        Name="BINDServerName"
        Kind="viewcriteria"
        Type="java.lang.String">
        <AttrArray Name="ExtendedDataInts">
          <Item Value="1"/>
        </AttrArray>
      </Variable>
      <Variable
        Name="BINDStartTimestamp"
        Kind="viewcriteria"
        Type="java.lang.Float">
        <AttrArray Name="ExtendedDataInts">
          <Item Value="3"/>
        </AttrArray>
      </Variable>
      <Variable
        Name="BINDEndTimestamp"
        Kind="viewcriteria"
        Type="java.lang.Float">
        <AttrArray Name="ExtendedDataInts">
          <Item Value="4"/>
        </AttrArray>
      </Variable>
      <SQLQuery>
        <![CDATA[SELECT
        ERRORLOG.SGUID GUID,
        ERRORLOG.LLOGTYPE LOGTYPE,
        ERRORLOG.DTIMESTAMP TIMESTAMP,
        ERRORLOG.SSERVERNAME SERVERNAME,
        ERRORLOG.SAPPNAME APPNAME,
        ERRORLOG.SXMLERROR XMLERROR
    FROM
        ERRORLOG ERRORLOG]]>
      </SQLQuery>
      <ViewAttribute
        Name="Guid"
        IsUpdateable="false"
        IsPersistent="false"
        IsNotNull="true"
        PrecisionRule="true"
        Precision="40"
        Scale="0"
        Type="java.lang.String"
        ColumnType="NVARCHAR2"
        AliasName="GUID"
        Expression="GUID"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="40"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="LogType"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="6"
        Scale="0"
        Type="java.lang.Integer"
        ColumnType="NUMBER"
        AliasName="LOGTYPE"
        Expression="LOGTYPE"
        SQLType="INTEGER">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="7"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Timestamp"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="54"
        Scale="0"
        Type="java.lang.Float"
        ColumnType="FLOAT"
        AliasName="TIMESTAMP"
        Expression="TIMESTAMP"
        SQLType="FLOAT">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="18"/>
        </DesignTime>
        <Dependencies>
          <Item
            Value="OccuredAt"/>
        </Dependencies>
      </ViewAttribute>
      <ViewAttribute
        Name="ServerName"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="64"
        Scale="0"
        Type="java.lang.String"
        ColumnType="NVARCHAR2"
        AliasName="SERVERNAME"
        Expression="SERVERNAME"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="64"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AppName"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="10"
        Scale="0"
        Type="java.lang.String"
        ColumnType="NVARCHAR2"
        AliasName="APPNAME"
        Expression="APPNAME"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="10"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="XmlError"
        IsUpdateable="false"
        IsQueriable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.lang.String"
        ColumnType="LONGVARCHAR"
        AliasName="XMLERROR"
        Expression="XMLERROR"
        SQLType="VARCHAR"/>
      <ViewAttribute
        Name="OccuredAt"
        IsUpdateable="false"
        IsSelected="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.sql.Date"
        ColumnType="DATE"
        AliasName="VIEW_ATTR"
        SQLType="DATE"/>
      <ViewAttribute
        Name="Summary"
        IsUpdateable="false"
        IsSelected="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="VIEW_ATTR"
        SQLType="VARCHAR"/>
      <ViewAttribute
        Name="TechnicalError"
        IsUpdateable="false"
        IsSelected="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="VIEW_ATTR"
        SQLType="VARCHAR"/>
      <ViewCriteria
        Name="MessagesROVOCriteria"
        ViewObjectName="model.bc4j.queries.admin.MessagesROVO"
        Conjunction="AND">
        <Properties>
          <CustomProperties>
            <Property
              Name="displayOperators"
              Value="InAdvancedMode"/>
            <Property
              Name="autoExecute"
              Value="false"/>
            <Property
              Name="allowConjunctionOverride"
              Value="true"/>
            <Property
              Name="showInList"
              Value="false"/>
            <Property
              Name="mode"
              Value="Basic"/>
          </CustomProperties>
        </Properties>
        <ViewCriteriaRow
          Name="vcrow6"
          UpperColumns="1">
          <ViewCriteriaItem
            Name="Timestamp"
            ViewAttribute="Timestamp"
            Operator="BETWEEN"
            Conjunction="AND"
            Required="Optional">
            <ViewCriteriaItemValue
              Name="MessagesROVOCriteria_vcrow6_Timestamp_vcval0"
              Value=":BINDStartTimestamp"
              IsBindVarValue="true"/>
            <ViewCriteriaItemValue
              Name="MessagesROVOCriteria_vcrow6_Timestamp_vcval1"
              Value=":BINDEndTimestamp"
              IsBindVarValue="true"/>
          </ViewCriteriaItem>
          <ViewCriteriaItem
            Name="ServerName"
            ViewAttribute="ServerName"
            Operator="="
            Conjunction="AND"
            Value=":BINDServerName"
            IsBindVarValue="true"
            Required="Optional"/>
          <ViewCriteriaItem
            Name="MessagesROVOCriteria_vcrow6_AppName"
            ViewAttribute="AppName"
            Operator="="
            Conjunction="AND"
            Value=":BINDApplicationName"
            IsBindVarValue="true"
            Required="Optional"/>
        </ViewCriteriaRow>
      </ViewCriteria>
      <AttrArray Name="KeyAttributes">
        <Item Value="Guid"/>
      </AttrArray>
      <ResourceBundle>
        <XliffBundle
          id="model.resource.ViewObjectsBundle_en"/>
      </ResourceBundle>
    </ViewObject>

    ADF does not support VO Range Paging with MS SQL Server. ADF supports VO Range Paging only with Oracle DB:
    Oracle ADF Business Components with Multiple Databases
    As far as the document above is not quite clear, I took a look inside the source code of the methods buildRangePagingQuery(...) of classes oracle.jbo.server.ViewObjectImpl, oracle.jbo.server.BaseSQLBuildeImpl, oracle.jbo.server.SQLServerSQLBuilderImpl and oracle.jbo.server.OracleSQLBuilderImpl (ADF 11.1.1.7) in order to confirm my statement.
    In my opinion, it is possible to add Range Paging support for a SQLServer-backed VO by implementing a custom VO class and overriding the method ViewObjectImpl.buildRangePagingQuery(...). Your method implementation should take into account the specifics of MS SQL Server and its SQL syntax.
    Dimitar
    Message was edited by: DimitarDimitrov
    P.S. The oracle.jbo.server.SQLServerSQLBuilderImpl class does not implement its own buildRangePagingQuery() method and uses the method implementation from its base class oracle.jbo.server.BaseSQLBuilderImpl, The base implementation just returns the original VO query intact. This is the reason you get the same rows as from the 1st page when you try to navigate through the pages.

Maybe you are looking for

  • Issue with GUI_download..

    Hi i m using gui_download to get data from tab delmiited files. but when i see the content inmy internal table being filled after this FM , im getting some junk characters. like  <(><)> or & or <br> etc. how to get rid of this ? i have some text in t

  • How do I move clips around to my preference?

    It forces me to leave them in order or date created. Terrible idea. And it has my project at a stand still Any help?

  • Weird Outlook Express Error

    Hi, I use MacOS 9.2.2 and OutLook Express 5.0.6. I have two email accounts. Lately whenever I go to retrieve email on one of the two email accounts, I get the following error description window: "Error: A message in your Outbox could not be sent. The

  • Accessing Java HttpServer from PHP;

    Hello all, I have created an httpserver using 'com.sun.net.httpserver'. Everything works fine except one thing. When i make this simple call from PHP (http://localhost:8081/something outputs an XML file):- $url = 'http://localhost:8081/something';  $

  • Why when i set up folders for my photos do they also appear in the photo library can I only have them appear in the folders???

    Why when i set up folders for my photos do they also appear in the photo library can I only have them appear in the folders and not duplicated in the photo library???