Bind Variables at runtimeADF mobile 11g:

Hi,
I am creating the Adf mobile application.
In table i have AD,DM,propertynumber,community,totalhomes,occ_curr,occ_fcst columns.
In first page i am displaying only AD's.under AD i have more than one DM.
In first page of my mobile application,i am showing only distinct(Ad) from the table.
if we select one of the AD and navigate to second page then we have to show the DM's,propertynumber 's,community....etc under that
selected AD.(my SQL query is select DM,propertynumber from table where ad= "selected AD in first page")
How can i send the selected AD in my first page as bind variable to my SQL query at runtime to create view object dynamically.so that in second page i can use this viewobject to show the dm's,property number,community..etc information.
Please anyone provide me the sample code or guidelines to achive this.
I appreciate your time and help.
Thanks
Saialja.
Edited by: sj0609 on Mar 30, 2009 9:10 AM
Edited by: sj0609 on Mar 30, 2009 9:48 AM

Hi John,
Thanks for the reply.
i created the AD_VO using SQL query select distinct(Ad) from iphone_demo.
next i create the second DM_VO using select DM,PROPERTYNUMBER,community,TOTALHOMES,OCC_CURR,OCC_FCST from iphone_demo.
next i created the viewlink between these two VO's by selecting source attribute as Ad from AD_VO and Destination Attribute as Dm from DM_vo .
Next in appmodule datamodel page i added the the instance DM_vo via the created view link to AD_VO .
when i run the App module to test the link it is not giving any detail rows under the selected AD it is showing only the column names.but i am not getting any rows.
The different AD's i am getting in first window.in second window no rows.
Can you tell me where i went wrong.
Sailaja.

Similar Messages

  • Bind variable in OBIEE 11G

    Hi,
    Is there any bind variable concept in OBIEE 11g.
    If it is not there then how to achieve this.How to write a where clause to get the result set dynamically.
    Thanks-Bhaskar Gouda
    Edited by: 961171 on Sep 25, 2012 12:44 AM

    Hi,
    I can make use of repository variable ,but my scale marker doesn't get changed .I am giving all the details .Please help me if you can.
    My scale marker SQL Query is as below.
    select trucks.factrucks
    from "plant model"
    Now i want to add a where clause say:
    select trucks.factrucks
    from "plant model"
    where truckid=:p_truckid;
    How can i do this and pass the parameter from go_url.Please help me out.
    Thanks-Bhaskar

  • 10g vs 11g: VO bind variable values stale on jbo.ampool.doampooling = false

    Hi gang
    (JDev 11g Build 5188)
    I'm currently doing some testing as recommended by the Fusion 11g Guide to test the ADF BC state management with jbo.ampool.doampooling = false (see sections 36 and 37). I'm seeing different behaviour under 11g vs 10g.
    I have a single updateable VO with a query restricted by a single bind variable. I have a single JSF page with the bind variable as an inputText control, the executeWithParams operation as a commandButton, and a table showing the results from the VO.
    Under 10g I can:
    1) Open the page
    2) Enter a value (say X) for the bind variable, hit the executeWithParams button and correctly see results in the table matching bind variable value X.
    3) Enter a different value for the bind variable (say Y), hit the executeWithParams button and correctly see results in the table matching value of the bind variable value Y.
    Under 11g I get different behaviour for # 3. Instead when I press the executeWithParams button with the value set to Y, the table still show results for the previous bind variable value X?
    It must be noted that if I set jbo.ampool.doampooling = true, the problem disappears, but presumably the error will reappear in a production system under load, so I need to track down what's happening here.
    Possibly I'm seeing a bug, but given the large amount of 11g changes and large amount of documentation I need to read on state management, it could just be I've missed something vital for 11g.
    Does anybody have any opinions what's happening here?
    Thanks for your help in advance.
    CM.

    Hi Chris,
    Yes, waking up in my lair after the long winter ;-)
    No problem for the version numbers.
    The reason I was asking was that the referenced issue was reported for JDeveloper 10.1.3.4.0
    So I'm not convinced this is the same issue.
    Bug 7517882 is fixed in 11.1.1.1.0, but a patch is available for 11.1.1.0.1
    I checked I could download it myself:
    1) in (classic) MetaLink, click tab "Patches & Updates"
    2) click "Simple Search"
    3) select "Search By" "Patch Number"
    4) enter the patch number: 7517882
    5) select the Platform "Microsoft Windows (32 bits)"
    6) click "Go"
    7) Download the patch for version 11.1.1.1.0
    8) click "View Readme" and follow instructions to install the patch.
    If you have any problem, open a SR requesting a support engineer to upload the patch on our FTP server.
    I would recommend you test the patch to ensure this is the same issue and the problem is fixed in your case after applying the patch.
    If not, you can easily de-install it anyway.
    For completeness, the following bugs were closed as duplicated of Bug 7517882
    Bug 7553275 - VOIMPL.GETBINDVARIABLE() RETURNS NULL AFTER APPLICATION MODULE ACTIVATION.
    (logged against 10.1.3.4.0)
    Bug 7556903 - JDEVELOPER 11G EXECUTEWITHPARAMS DOES NOT WORK CORRECTLY WITH AMPOOLING OFF
    (logged against 11.1.1.0.0)
    Regards,
    Didier.

  • ADF 11g:set bind variable

    Hi All,
    Requirement is to set the value of bind variable of the recursive view object(DynamicTreeMenuVO1) on which my af:tree is based at run time. The value of the bind variable is coming from DynamicMenuVO1Iterator view object at run time("#{rows.displayVal}"), when I am iterating the DynamicMenuVO1Iterator using af:forEach.
    Following code is there on my jspx page:-
    <af:panelAccordion id="acc" discloseMany="false" discloseNone="false">
    <af:forEach items="#{data.view_DynamicGalleryTreePageDef.DynamicMenuVO1Iterator.allRowsInRange}" var="rows">
    <af:showDetailItem text="#{rows.displayVal}" id="sdi1">
    <af:tree value="#{bindings.DynamicTreeMenuVO1.treeModel}" var="node"
    selectionListener="#{bindings.DynamicTreeMenuVO1.treeModel.makeCurrent}"
    rowSelection="single" id="t1">
    <f:facet name="nodeStamp">
    <af:outputText value="#{node}" id="ot1"/>
    </f:facet>
    </af:tree>
    </af:showDetailItem>
    </af:forEach>
    </af:panelAccordion>
    Unable to find how to pass the value #{rows.displayVal} to the bind variable of DynamicTreeMenuVO1 at run time. Please help
    Thanks,
    Vikram

    Will using the groovy expression to set the bind variable value by referencing desired attributes in DynamicMenuVO1Iterator work?
    Can any one can give me the grovvy expression to "*Referencing attributes in other view objects*".
    Any inputs please..........................
    Edited by: Vikram K on Feb 25, 2010 7:23 PM

  • SLOW report performance with bind variable

    Environment: 11.1.0.7.2, Apex 4.01.
    I've got a simplified report page where the report runs slowly compared to running the same query in sqldeveloper. The report region is based on a pl/sql function returning a query. If I use a bind variable in the query inside apex it takes 13 seconds to run, and if I hard code a string it takes only a few hundredths of a second. The query returns one row from a table which has 1.6 million rows. Statistics are up-to-date and the columns in the joins and where clause are indexed.
    I've run traces using p_trace=YES from Apex for both the bind variable and hard coded strings. They are below.
    The sqldeveloper explain plan is identical to the bind variable plan from the trace, yet the query runs in 0.0x seconds in sqldeveloper.
    What is it about bind variable syntax in Apex that is causing the bad execution plan? Apex Bug? 11g bug? Ideas?
    tkprof output from Apex trace with bind variable is below...
    select p.master_id link, p.first_name||' '||p.middle_name||' '||p.last_name||' '||p.suffix personname,
    p.gender||' '||p.date_of_birth g_dob, p.master_id||'*****'||substr(p.ssn,-4) ssn, p.status status
    from persons p
    where
       p.person_id in (select ps.person_id from person_systems ps where ps.source_key  like  LTRIM(RTRIM(:P71_SEARCH_SOURCE1)))
    order by 1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.01          0          1         27           0
    Fetch        2     13.15      13.22      67694      72865          0           1
    total        4     13.15      13.23      67694      72866         27           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62  (ODPS_PRIVACYVAULT)   (recursive depth: 1)
    Rows     Row Source Operation
          1  SORT ORDER BY (cr=72869 pr=67694 pw=0 time=0 us cost=29615 size=14255040 card=178188)
          1   FILTER  (cr=72869 pr=67694 pw=0 time=0 us)
          1    HASH JOIN RIGHT SEMI (cr=72865 pr=67694 pw=0 time=0 us cost=26308 size=14255040 card=178188)
          1     INDEX FAST FULL SCAN IDX$$_0A300001 (cr=18545 pr=13379 pw=0 time=0 us cost=4993 size=2937776 card=183611)(object id 68485)
    1696485     TABLE ACCESS FULL PERSONS (cr=54320 pr=54315 pw=0 time=21965 us cost=14958 size=108575040 card=1696485)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          1   SORT (ORDER BY)
          1    FILTER
          1     HASH JOIN (RIGHT SEMI)
          1      INDEX   MODE: ANALYZED (FAST FULL SCAN) OF
                     'IDX$$_0A300001' (INDEX)
    1696485      TABLE ACCESS   MODE: ANALYZED (FULL) OF 'PERSONS' (TABLE)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file scattered read                       1276        0.00          0.16
      db file sequential read                       812        0.00          0.02
      direct path read                             1552        0.00          0.61
    ********************************************************************************Here's the tkprof output with a hard coded string:
    select p.master_id link, p.first_name||' '||p.middle_name||' '||p.last_name||' '||p.suffix personname,
    p.gender||' '||p.date_of_birth g_dob, p.master_id||'*****'||substr(p.ssn,-4) ssn, p.status status
    from persons p
    where
       p.person_id in (select ps.person_id from person_systems ps where ps.source_key  like  LTRIM(RTRIM('0b')))
    order by 1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.02       0.04          0          0          0           0
    Execute      1      0.00       0.00          0          0         13           0
    Fetch        2      0.00       0.00          0          8          0           1
    total        4      0.02       0.04          0          8         13           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 62  (ODPS_PRIVACYVAULT)   (recursive depth: 1)
    Rows     Row Source Operation
          1  SORT ORDER BY (cr=10 pr=0 pw=0 time=0 us cost=9 size=80 card=1)
          1   FILTER  (cr=10 pr=0 pw=0 time=0 us)
          1    NESTED LOOPS  (cr=8 pr=0 pw=0 time=0 us)
          1     NESTED LOOPS  (cr=7 pr=0 pw=0 time=0 us cost=8 size=80 card=1)
          1      SORT UNIQUE (cr=4 pr=0 pw=0 time=0 us cost=5 size=16 card=1)
          1       TABLE ACCESS BY INDEX ROWID PERSON_SYSTEMS (cr=4 pr=0 pw=0 time=0 us cost=5 size=16 card=1)
          1        INDEX RANGE SCAN IDX_PERSON_SYSTEMS_SOURCE_KEY (cr=3 pr=0 pw=0 time=0 us cost=3 size=0 card=1)(object id 68561)
          1      INDEX UNIQUE SCAN PK_PERSONS (cr=3 pr=0 pw=0 time=0 us cost=1 size=0 card=1)(object id 68506)
          1     TABLE ACCESS BY INDEX ROWID PERSONS (cr=1 pr=0 pw=0 time=0 us cost=2 size=64 card=1)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          1   SORT (ORDER BY)
          1    FILTER
          1     NESTED LOOPS
          1      NESTED LOOPS
          1       SORT (UNIQUE)
          1        TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                       'PERSON_SYSTEMS' (TABLE)
          1         INDEX   MODE: ANALYZED (RANGE SCAN) OF
                        'IDX_PERSON_SYSTEMS_SOURCE_KEY' (INDEX)
          1       INDEX   MODE: ANALYZED (UNIQUE SCAN) OF 'PK_PERSONS'
                      (INDEX (UNIQUE))
          1      TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                     'PERSONS' (TABLE)

    Patrick, interesting insight. Thank you.
    The optimizer must be peeking at my bind variables with it's eyes closed. I'm the only one testing and I've never passed %anything as a bind value. :)
    Here's what I've learned since my last post:
    I don't think that sqldeveloper is actually using the explain plan it says it is. When I run explain plan in sqldeveloper (with a bind variable) it shows me the exact same plan as Apex with a bind variable. However, when I run autotrace in sqldeveloper, it takes a path that matches the hard coded values, and returns results in half a second. That autotrace run is consistent with actually running the query outside of autotrace. So, I think either sqldeveloper isn't really using bind variables, OR it is using them in some other way that Apex does not, or maybe optimizer peeking works in sqldeveloper?
    Using optimizer hints to tweak the plan helps. I've tried both /*+ FIRST_ROWS */ and /*+ index(ps pk_persons) */ and both drop the query to about a second. However, I'm loath to use hints because of the very dynamic nature of the query (and Tom Kyte doesn't like them either). The hints may end up hurting other variations on the query.
    I also tested the query by wrapping it in a select count(1) from ([long query]) and testing the performance in sqldeveloper and in Apex. The performance in that case is identical with both bind variables and hard coded variables for both Apex and SqlDeveloper. That to me was very interesting and I went so far as to set up two bind variable report regions on the same page. One region wrapped the long query with select count(1) from (...) and the other didn't. The wrapped query ran in 0.01 seconds, the unwrapped took 15ish seconds with no other optimizations. Very strange.
    To get performance up to acceptable levels I have changed my function returning query to:
    1) Set the equality operator to "=" for values without wildcards and "like" for user input with wildcards. This makes a HUGE difference IF no wildcard is used.
    2) Insert a /*+ FIRST_ROWS */ hint when users chose the column that requires the sub-query. This obviously changes the optimizer's plan and improves query speed from 15 seconds to 1.5 seconds even with wildcards.
    I will NOT be hard coding any user supplied values in the query string. As you can probably tell by the query, this is an application where sql injection would be very bad.
    Jeff, regarding your question about "like '%' || :P71_SEARCH_SOURCE1 || '%'". I've found that putting wildcards around values, particularly at the beginning will negate any indexing on the column in question and slows performance even more.
    I'm still left wondering if there isn't something in Apex that is breaking the optimizer "peeking" that Patrick describes. Perhaps something in the way it switches contexts from apex_public_user to the workspace schema?

  • Search parameter type with bind variable

    For Search type parameter in Oracle BI Publisher, if the List of values (SQL Query) contains bind variable, then application keep on searching. Any suggestions ?.
    Thanks in advance.
    Edited by: 966132 on 17-Oct-2012 22:23

    I don't think the search-type parameter works properly. It doesn't seem to function in our OBIEE 11g (11.1.1.5 + BP3). When you use a query that retrieves both the descriptive string and the numeric ID, the search box does correctly show the descriptive string. However, after selecting one of the choices, the actual data query returns nothing.
    Furthermore, the extra steps required to search take longer than scrolling through a very long list of values, the normal way. Good idea, bad implementation, no surprise.

  • Using bind variables (in & out) with dynamic sql

    I got a table that holds pl/sql code snippets to do validations on a set of data. what the code basically does is receiving a ID and returning a number of errors found.
    To execute the code I use dynamic sql with two bind variables.
    When the codes consists of a simpel query, it works like a charm, for example with this code:
    BEGIN
       SELECT COUNT (1)
       INTO :1
       FROM articles atl
       WHERE ATL.CSE_ID = :2 AND cgp_id IS NULL;
    END;however when I get to some more complex validations that need to do calculations or execute multiple queries, I'm running into trouble.
    I've boiled the problem down into this:
    DECLARE
       counter   NUMBER;
       my_id     NUMBER := 61;
    BEGIN
       EXECUTE IMMEDIATE ('
          declare
             some_var number;
          begin
          select 1 into some_var from dual
          where :2 = 61;
          :1 := :2;
          end;
          USING OUT counter, IN my_id;
       DBMS_OUTPUT.put_line (counter || '-' || my_id);
    END;this code doesn't really make any sense, but it's just to show you what the problem is. When I execute this code, I get the error
    ORA-6537 OUT bind variable bound to an IN position
    The error doesn't seem to make sense, :2 is the only IN bind variable, and it's only used in a where clause.
    As soon as I remove that where clause , the code will work again (giving me 61-61, in case you liked to know).
    Any idea whats going wrong? Am I just using the bind variables in a way you're not supposed to use them?
    I'm using Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit

    Correction. With execute immediate binding is by position, but binds do not need to be repeated. So my statement above is incorrect..
    You need to bind it once only - but bind by position. And the bind must match how the bind variable is used.
    If the bind variable never assigns a value in the code, bind as IN.
    If the bind variable assigns a value in the code, bind as OUT.
    If the bind variable assigns a value and is used a variable in any other statement in the code, bind as IN OUT.
    E.g.
    SQL> create or replace procedure FooProc is
      2          cnt     number;
      3          id      number := 61;
      4  begin
      5          execute immediate
      6  'declare
      7          n       number;
      8  begin
      9          select
    10                  1 into n
    11          from dual
    12          where :var1 = 61;       --// var1 is used as IN
    13 
    14          :var2 := n * :var1;     --// var2 is used as OUT and var1 as IN
    15          :var2 := -1 * :var2;    --// var2 is used as OUT and IN
    16  end;
    17  '
    18          using
    19                  in out id, in out cnt;  --// must reflect usage above
    20 
    21          DBMS_OUTPUT.put_line ( 'cnt='||cnt || ' id=' || id);
    22  end;
    23  /
    Procedure created.
    SQL>
    SQL> exec FooProc
    cnt=-61 id=61
    PL/SQL procedure successfully completed.
    SQL>

  • Using Bind Variable in a SELECT

    Hi,
    I'm trying to build up my SQL query at run-time using bind variables and in the Oracle® Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework 11g Release 1 (11.1.1) it says that 'After defining the bind variables, the next step is to reference them in the SQL statement. While SQL syntax allows bind variables to appear both in the SELECT list and in the WHERE clause, you'll typically use them in the latter context, as part of your WHERE clause.'.
    However, when I try to use the bind variables in my SELECT list because I've had to set a type for the variable to String the variable gets inserted with inverted commas either side e.g. SELECT 'Service' FROM TestTable. Is it possible to use bind variables to insert a value into my select list without these inverted commas around it?
    Thanks in advance,
    Tom

    OK, thanks for your response. Do you know of a way then where I can control my SELECT parameters programmatically? I'm currently trying to do it using the information in the chapter '35.9 Using Programmatic View Objects for Alternative Data Sources' from the Oracle® Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework 11g Release 1 (11.1.1). I think I'm part way there, would this be the correct way of acheiving what I want?
    Cheers, Tom

  • Problem in setting bind variable

    Hi,
    I am sorry but I think I am having problem with this simple ADF BC concept.
    I created a View object from HR Schema and I wanted to filter it with department id
    so I created a bind variable :dept_id.
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="EmployeesView"
      Version="11.1.1.59.23"
      SelectList="Employees.EMPLOYEE_ID,
           Employees.FIRST_NAME,
           Employees.LAST_NAME,
           Employees.EMAIL,
           Employees.PHONE_NUMBER,
           Employees.HIRE_DATE,
           Employees.JOB_ID,
           Employees.SALARY,
           Employees.COMMISSION_PCT,
           Employees.MANAGER_ID,
           Employees.DEPARTMENT_ID"
      FromList="EMPLOYEES Employees"
      BindingStyle="OracleName"
      CustomQuery="false"
      PageIterMode="Full"
      UseGlueCode="false"
      Where="Employees.DEPARTMENT_ID = :dept_id"
      RowClass="com.test.view.EmployeesViewRowImpl"
      ComponentClass="com.test.view.EmployeesViewImpl">
      <DesignTime>
        <Attr Name="_codeGenFlag2" Value="Access|Coll|VarAccess"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <Variable
        Name="dept_id"
        Kind="viewcriteria"
        Type="oracle.jbo.domain.Number"/>
      <ViewAccessor
        Name="JobsView1"
        ViewObjectName="com.test.view.JobsView"
        RowLevelBinds="true"/>
      <ViewAccessor
        Name="EmployeesView1"
        ViewObjectName="com.test.view.EmployeesView"
        RowLevelBinds="true"/>
      <ViewAccessor
        Name="DepartmentsView1"
        ViewObjectName="com.test.view.DepartmentsView"
        RowLevelBinds="true"/>
      <ListBinding
        Name="LOV_JobId"
        ListVOName="JobsView1"
        ListRangeSize="10"
        NullValueFlag="none"
        NullValueId="LOV_JobId_LOVUIHints_NullValueId"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="JobId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="JobId"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="JobTitle"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <ListBinding
        Name="LOV_ManagerId"
        ListVOName="EmployeesView1"
        ListRangeSize="-1"
        NullValueFlag="start"
        NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="ManagerId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="EmployeeId"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="FirstName"/>
          <Item Value="LastName"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <ListBinding
        Name="LOV_DepartmentId"
        ListVOName="DepartmentsView1"
        ListRangeSize="-1"
        NullValueFlag="start"
        NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="DepartmentId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="DepartmentId"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="DepartmentName"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <EntityUsage
        Name="Employees"
        Entity="com.test.Employees"/>
      <ViewAttribute
        Name="EmployeeId"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="EmployeeId"
        EntityUsage="Employees"
        AliasName="EMPLOYEE_ID"/>
      <ViewAttribute
        Name="FirstName"
        PrecisionRule="true"
        EntityAttrName="FirstName"
        EntityUsage="Employees"
        AliasName="FIRST_NAME"/>
      <ViewAttribute
        Name="LastName"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="LastName"
        EntityUsage="Employees"
        AliasName="LAST_NAME"/>
      <ViewAttribute
        Name="Email"
        IsUnique="true"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="Email"
        EntityUsage="Employees"
        AliasName="EMAIL"/>
      <ViewAttribute
        Name="PhoneNumber"
        PrecisionRule="true"
        EntityAttrName="PhoneNumber"
        EntityUsage="Employees"
        AliasName="PHONE_NUMBER"/>
      <ViewAttribute
        Name="HireDate"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="HireDate"
        EntityUsage="Employees"
        AliasName="HIRE_DATE"/>
      <ViewAttribute
        Name="JobId"
        LOVName="LOV_JobId"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="JobId"
        EntityUsage="Employees"
        AliasName="JOB_ID">
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="Salary"
        PrecisionRule="true"
        EntityAttrName="Salary"
        EntityUsage="Employees"
        AliasName="SALARY"/>
      <ViewAttribute
        Name="CommissionPct"
        PrecisionRule="true"
        EntityAttrName="CommissionPct"
        EntityUsage="Employees"
        AliasName="COMMISSION_PCT"/>
      <ViewAttribute
        Name="ManagerId"
        LOVName="LOV_ManagerId"
        PrecisionRule="true"
        EntityAttrName="ManagerId"
        EntityUsage="Employees"
        AliasName="MANAGER_ID">
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="choice"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="DepartmentId"
        LOVName="LOV_DepartmentId"
        PrecisionRule="true"
        EntityAttrName="DepartmentId"
        EntityUsage="Employees"
        AliasName="DEPARTMENT_ID">
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="choice"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewLinkAccessor
        Name="EmployeesView"
        ViewLink="com.test.view.EmpManagerFkLink"
        Type="oracle.jbo.RowIterator"
        IsUpdateable="false"/>
      <ViewLinkAccessor
        Name="DepartmentsView"
        ViewLink="com.test.view.DeptMgrFkLink"
        Type="oracle.jbo.RowIterator"
        IsUpdateable="false"/>
    </ViewObject>But when I ran it in my Business Component Browser, I am encountering below error
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1Not sure but did I miss something? Thanks
    JDEV 11G PS3

    Hi Frank,
    Thanks, I think thats the gotcha...
    setting the bind variable to required causes the dialog to appear...
    Not sure though if this is a bug or something..

  • Asking for bind variable where none is needed

    Good Morning,
    I am still working these regexp date_time project.
    I have a problem where oracle is asking for a bind variable where it doesn't need any as far as I can see. I am trying to capture various date times in a column and formatting them into one default format used by oracle. Here is what I got which works before I wrap it in the TO_DATE function
    There are many when then's but I am using only one here.
    select case
    when regexp_substr(date_time,'^(0?[1-9]|1[0-2])/(0?[1-9]|[1-2][0-9]|3[0-1])/9[[:digit:]]{4}') is not null
    then regexp_substr(date_time,'^(0?[1-9]|1[0-2])/(0?[1-9]|[1-2][0-9]|3[0-1])/9[[:digit:]]{4}')
    else date_time
    end as new_time
    from raw_data;
    The above statement works
    Now when I want to format the date that I found with this:
    select case
    when regexp_substr(date_time,'^(0?[1-9]|1[0-2])/(0?[1-9]|[1-2][0-9]|3[0-1])/9[[:digit:]]{4}') is not null
    then TO_DATE('regexp_substr(date_time,'^(0?[1-9]|1[0-2])/(0?[1-9]|[1-2][0-9]|3[0-1])/9[[:digit:]]{4}')','MM/DD/YYYY')
    else date_time
    end as new_time
    from raw_data;
    I get a request to insert a value for the digit as a bind variable. The digit should be populated from the when statement when it returns not null when a date is found.
    Could some one please tell me even if what I wrote here is even possible or make a suggestion to the syntax to get around this issue?
    All this is going to be incorporated into an update statement later on.
    I am running this on sql developer, oracle 11g.
    Thanks for your help in this matter in advance.
    regards,
    Al

    From looking at the code, as you have not supplied any scripts to create a table and demonstrate the error...
    Your case statement is trying to return two types
    select case
    when regexp_substr(date_time,'^(0?[1-9]|1[0-2])/(0?[1-9]|[1-2][0-9]|3[0-1])/9[[:digit:]]{4}') is not null
    then TO_DATE('regexp_substr(date_time,'^(0?[1-9]|1[0-2])/(0?[1-9]|[1-2][0-9]|3[0-1])/9[[:digit:]]{4}')','MM/DD/YYYY')
    else date_time
    end as new_time
    from raw_data;or simply
    select case when <expr>
                then <RETURN A DATE>
                else <RETURN A VARCHAR2>
            end as new_time
      from raw_data;The column cannot be both.
    Sorry I don't know your requirements.
    You could drop the else part and just return the converted date.
    You could fetch it back in two columns, the ones you can convert in one column (Which would be an oracle date type),
    the ones you cannot convert in another (which would be varchar2).
    Cheers,
    GP>

  • Select One Choice attribute' LoV based on two bind variables, best practice

    Hello there,
    I am in the process of learning the ADF 11g, I have following requirement,
    A page must contain a list of school names which is needed to be fetched based on two parameters, the parameters are student information been inserted in the previous page.
    I have defined a read only view "SchoolNamesViewRO", it's query depends on two bind variables :stdDegree and stdCateg.
    added that RO View as a view accessor to the entity to which the name attribute belongs, and then add LoV for the name attribute using the ReadOnly view,
    added the name attribute as Select One Choice to page2,
    and now I need to pass the values of the bind variables of the ReadOnly view,
    the information needed to be passed as the bind variables is inserted in the previous page, I could have the data as bindings attribute values in the page2 definition
    I have implemented the next two appraoches but both resulted in an empty list :
    * added ExecuteWithParams Action to the bindings of the page and then defined an Invoke Action (set refresh condition) in the executable s, set the default values of the parameters to be the attributes values' input value,
    in the trace I code see that the binding fetches correct values as supposed , but the select list appears empty, does the this execution for the query considered to be connected to the list ?
    * added a method to the ReadOnly view Imp java class to set the bind variables, then I define it as a MethodAction in the bindings , and then create an Invoke action for it , also the select is empty,
    if the query been executed with the passed variables, then why the list is empty? is it reading data from another place than the page!
    and what is the best practice to implement that requirement?
    would the solution be : by setting the default value of the bind variables to be some kind of Expression!
    please notice that query execution had the bound variables ( I see in the trace) are set to the correct values.
    would you give some hints or redirect me to a useful link,
    Thanks in advance
    Regards,

    please give me any example using backing bean .for example
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:selectOneChoice label="Label 1" id="soc1" binding="#{Af.l1}"
    autoSubmit="true">
    <af:selectItem label="A" value="1" id="si1"/>
    <af:selectItem label="B" value="2" id="si2"/>
    </af:selectOneChoice>
    <af:selectOneChoice label="Label 2" id="soc2" disabled="#{Af.l1=='2'}"
    partialTriggers="soc1">
    <af:selectItem label="C" value="3" id="si3"/>
    <af:selectItem label="D" value="4" id="si4"/>
    </af:selectOneChoice>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    package a;
    import oracle.adf.view.rich.component.rich.input.RichSelectOneChoice;
    public class A {
    private RichSelectOneChoice l1;
    public A() {
    public void setL1(RichSelectOneChoice l1) {
    this.l1 = l1;
    public RichSelectOneChoice getL1() {
    return l1;
    is there any mistake

  • Not able to clear bind variable following Fusion Dev Guide Document Steps.

    Dear All,
    I am having trouble following the Fusion Developer Guide specifically the items on below link
    http://docs.oracle.com/cd/E23943_01/web.1111/b31974/bcquerying.htm#CHDDHIHJc
    1.     (Request begins and application module is acquired)
    2.  Call setWhereClause(null) to clear WHERE clause
    3.  Call setWhereClauseParam(null) to clear the WHERE clause bind variables
    4.  Call setWhereClause() that references n bind variables
    5.  Calling setWhereClauseParam() to set the n values for those n bind variables
    6.  Calling executeQuery()
    7.  (Application module is released)I wanted to actually clear all my bind variables including the bind variable that I have set in the query.
    SELECT Persons.PERSON_ID,
           Persons.PRINCIPAL_NAME,
           Persons.TITLE,
           Persons.FIRST_NAME,
           Persons.LAST_NAME,
           Persons.PERSON_TYPE_CODE,
           Persons.SUPPLIER_ID,
           Persons.PROVISIONED_FLAG,
           Persons.PRIMARY_ADDRESS_ID,
           Persons.REGISTERED_DATE,
           Persons.MEMBERSHIP_ID,
           Persons.EMAIL,
           Persons.CONFIRMED_EMAIL,
    FROM PERSONS Persons
    WHERE Persons.PERSON_TYPE_CODE = :PERSON_TYPE_CODE_PARAMStep 3 is where I am having problem. I cant find in the API regarding setWhereClauseParam(null) that accepts String but
    it only has setWhereClauseParam(int, String)
    Not sure if I am running on some documentation bug.
    JDEV 11G PS5

    This look like a documentation bug to me.
    The right method to call is
    setWhereClauseParams(null); //note the 's' in Params!Timo

  • Af:iterator and view accessors with bind variables

    I have a page with an af:iterator where I list up each row in a form layout. On each row there are 2 SelectOneChoice items where the current value is provided by the row. The 2 LOVs are Master-Detail-LOVs. The value of the first one restricts the values of the second one.
    Each LOV is represented by a LOV view object in a shared application module. The view object for the second LOV contains a view criteria with a selection on the column where the value is provided by the first LOV. The value for the restriction is passed via Bind Variable.
    <af:iterator id="i_images" value="#{bindings.Image.collectionModel}" var="row" rows="0" varStatus="vs">
    <af:selectOneChoice value="#{row.bindings.Master.inputValue}" label="#{bindings.Master.label}" id="soc_master" autoSubmit="true">
    <f:selectItems value="#{row.bindings.Master.items}"
    id="si3"/>
    </af:selectOneChoice>
    <af:selectOneChoice value="#{row.bindings.Detail.inputValue}" label="#{bindings.Detail.label}" id="soc2" partialTriggers="soc_master">
    <f:selectItems value="#{row.bindings.Detail.items}"
    id="si2"/>
    </af:selectOneChoice>
    The view accessor for both LOVs have the settings:
    Row Level Bind Values = true
    SharedInstance = false
    BTW: If I modify one the two view accessor the value for Row Level Bind Values disappear.
    The value for the bind variable on the view accessor is "Master" like the name of the column.
    On loading the page for the first time the LOVs and the values are properly resolved. The master LOV provides the list with all values and the Detail LOV is restricted corresponding the value of the Master LOV. Upon changing the value of the Master LOV the Detail LOV is reloaded, because of the partial trigger, but now the Detail LOV contains all the values as if now View Criteria has been provided.
    We implemented this scenario in an af:query and it worked fine. Are there any restrictions for View Accessors when using an af:iterator??
    Any help is appreciated.
    Thanks,
    Thomas
    P.S.: We're using JDeveloper 11.1.1.4.0
    Edited by: thomas.matzke on Apr 20, 2011 10:07 PM

    Hi Thomas,
    You may be hitting an error that is discussed in the following blog: http://andrejusb.blogspot.com/2011/03/adf-bc-dependent-lov-11g-ps2ps3-bug-and.html
    Hope this helps!
    Russell

  • Setting bind variable for a view object from the Managed Bean

    Hi,
    i am using JDeveloper 11g, i have to create LOV in the JSF. To show the LOV, it has to populate data using View object and its query parameter need to be sent from the Managed Bean.
    For the View object i want to set the bind variable parameter from the managed bean value. bename is stored in a managed bean (session scope)
    #{beantest.bename}
    But it gives the following exception.
    JBO-29000: Unexpected exception caught:
    org.codehaus.groovy.control.MultipleCompilationErrorsException,msg=startup failed, Script1.groovy: 1: expecting '!',found '{'@ line1, column 2.
    I have followed the link http://kr.forums.oracle.com/forums/thread.jspa?threadID=615474 like Frank wrote on 8.2.2008:
    But steps are not clear.
    How to input the VO bind parameter with Managed bean variable?
    Any Help
    Regards
    Raj
    Edited by: user9928180 on Dec 17, 2008 9:51 AM

    Hi,
    a bind variable in a VO needs to be exposed as an executeWithParams operation in the pageDef file. Just add a new action binding to the pageDef file (context menu) and select the executeWithParams operation on teh VO. Then in the argument field, reference the managed bean property for the value
    Frank

  • Error with clob column: "No pl/sql translation for the blind type given for this bind variable"

    This is reports 11g
    I've got a clob column. Reports seems to recognize its type, but if I try to reference it in a format trigger, I get this error at compile time:
    "No pl/sql translation for the blind type given for this bind variable"

    Actually, Reports is in something better than Forms.
    Neither Forms nor Reports do not have "complete" SQL engine (both have only "complete" PL/SQL engine), but have their own SQL parser, which does not understand SQL commands after the database 8.0.
    But, in Reports Data Model - SQL Query Statement, we can write "modern" SQL statement (> database 8.0), because Reports sent it directly to the database, without using their own SQL parser.
    For example, in Reports Data Model - SQL Query Statement, we can write this (scalar subquery expressions, in bold):
    select empno,
           ename,
           deptno,
           (select dname from dept where deptno = emp.deptno) dname
      from emp
    order by empno;
    although scalar subquery expressions was introduced in the database 9.0.1, and in databases 8.0 and 8.1 we should write someting like this:
    select emp.empno,
           emp.ename,
           emp.deptno,
           dept.dname
      from emp,
           dept
    where dept.deptno = emp.deptno
    order by empno;
    Regards,
    Zlatko

Maybe you are looking for

  • How to enter a value versus picking one from the pop-up menu?

    I am new to numbers and am using version 3.5.2.  I understand one can define a Pop-Up for cell value selection, but what if I want to also be able to specify a value that is not in the pull down?  I thought "start with blank" would do the trick, but

  • FireWire 400 to FireWire 800

    I have just purchased an iMac which has only one FireWire 800 outlet. I have three external HDs which are compatible w FireWire 400 outlets only. Is there a way for me to be able to use these HDs with this new machine? Is there a wire that would allo

  • Java.io.FileNotFoundException: Response: '403: Forbidden' for url

    Hi, I'm in wls7.0sp6 and trying to connect to a secure site, bu all I get is either "java.io.FileNotFoundException: Response: '403: Forbidden' for url 'https://www.....'" or java.net.SocketException: Connection aborted by peer: JVM_recv in socket inp

  • If RMAN incremental level-1 backup fails...

    Hi there, I have a question. If the RMAN incremental level-1 backup fails, will the next level-1 backup attempt take backup of all changes since last successful level-0 OR level-1 backup? Best regards

  • How to move from one page to another page

    hi all we have a report,in that if i click on user name he has to go to another page, in that page i have created one prompt and one report ,there he has to select groups(prompt) and in that page only he has to see the report how to provide like to p