How use integer variable as object in query

sir how use integer variable as object in query
see my code
Integer currentssgg = new Integer(tt.getValue().toString()); no error
//yy.setValue(currentss); no error
//yy.setValue(new Integer(tt.getValue().toString())); no eror
getSessionBean1().getTripRowSet().setObject(1,currentssgg); giv error
tripDataProvider.refresh();
and how use string variable same as method
please give me idea how use integer variable as object in query
thank's
aamir

>> var mnu = 'menu1';
this[mnu].onRollOver = function(){
<<
Close, but it needs to be like this:
var mnu = 1;
this["menu" + mnu].onRollOver = function(){
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

Similar Messages

  • How to use a variable as object name? in actionscript?

    I am working on a flash menu and have a problem in it.
    here is the code i am using.
    I wanna use the variable mnu instead of this[mnu] but do not
    know how to do it. Any body can help me?

    >> var mnu = 'menu1';
    this[mnu].onRollOver = function(){
    <<
    Close, but it needs to be like this:
    var mnu = 1;
    this["menu" + mnu].onRollOver = function(){
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • How to use bind variables in the following query

    CREATE OR REPLACE PROCEDURE MMDB.test IS
    sel_qtn VARCHAR2 (10);
    CURSOR PT_QUANTITY IS select * from mmdb.product_tree WHERE QUANTITY_CHECK ='E'
    AND run_id = 100
    a PT_QUANTITY%ROWTYPE;
    BEGIN
    FOR i IN PT_QUANTITY
    loop
    sel_qtn := i.quanttity-1;
    While sel_qtn>=1
    loop
    insert into mmdb.product_tree (BILLING_ACCOUNT_NO ,S_CODE) values (i.BILLING_ACCOUNT_NO ,i.S_CODE||'E');
    sel_qtn :=sel_qtn -1;
    End loop;
    commit;
    end;

    Don't duplicate threads: How to use bind variables in the following query

  • BUG ? :  ADF creating extra VO instance using bind variables in a LOV query

    ADF 11.1.1.1.0
    After "playing around" with bind variables Setting bind variables in view objects for LOV I've come across something strange that I've reproduce using the HR schema and tables Employees and Departments. Its a bit long but here goes :
    Using the HR schema tables departments and employeesI'm trying to create a LOV (selectOneChoice) for the
    employee department, the LOV having a bind variable that limits the values returned in this case returning only DepartmentId = 50
    I've create a VO lovDepartment (not based on an EO) with the following query :
    SELECT Departments.DEPARTMENT_ID,
           Departments.DEPARTMENT_NAME,
           Departments.MANAGER_ID,
           Departments.LOCATION_ID
    FROM DEPARTMENTS Departments
    where DEPARTMENT_ID  = :pDeptIdA LOV has been defined on the DepartmentId attribute of the EmployeesView.
    The lovDepartmentImpl overrides the executeQueryForCollection to set the bind variable value.
        @Override
        protected void executeQueryForCollection(Object object, Object[] object2,
                                                 int i) {
            setNamedWhereClauseParam("pDeptId", "50");       
            super.executeQueryForCollection(object, object2, i);
        }When using an ADF form to create a new employee the DepartmentId lov is empty.
    Enabling SQL tracing shows the following :
    [370] _LOCAL_VIEW_USAGE_model_EmployeesView_lovDepartment1_0 ViewRowSetImpl.doSetWhereClause(-1, pDeptId, null)
    [371] _LOCAL_VIEW_USAGE_model_EmployeesView_lovDepartment1_0 ViewRowSetImpl.execute caused params to be "un"changed
    [372] Column count: 4
    [373] _LOCAL_VIEW_USAGE_model_EmployeesView_lovDepartment1_0 ViewRowSetImpl.doSetWhereClause(-1, pDeptId, null)
    [374] _LOCAL_VIEW_USAGE_model_EmployeesView_lovDepartment1 ViewRowSetImpl.setNamedWhereClauseParam(pDeptId, 50)
    [375] ViewObject: _LOCAL_VIEW_USAGE_model_EmployeesView_lovDepartment1 Created new QUERY statement
    [376] _LOCAL_VIEW_USAGE_model_EmployeesView_lovDepartment1>#q computed SQLStmtBufLen: 235, actual=195, storing=225
    [377] SELECT Departments.DEPARTMENT_ID,
           Departments.DEPARTMENT_NAME,
           Departments.MANAGER_ID,
           Departments.LOCATION_ID
    FROM DEPARTMENTS Departments
    where DEPARTMENT_ID  = :pDeptId
    [378] Bind params for ViewObject: _LOCAL_VIEW_USAGE_model_EmployeesView_lovDepartment1
    [379] For RowSet : _LOCAL_VIEW_USAGE_model_EmployeesView_lovDepartment1_0
    [380] Binding null of type 12 for "pDeptId"
    [381] No Resource Bundle found but null value id:LOV_DepartmentId_LOVUIHints_NullValueId is defined in an ListBinding Definition.It would seem that 2 lovDepartment instances are used one at line 370 LOCALVIEW_USAGE_model_EmployeesView_lovDepartment1_0
    and one at line 374 LOCALVIEW_USAGE_model_EmployeesView_lovDepartment1
    The one at line 374 LOCALVIEW_USAGE_model_EmployeesView_lovDepartment1 gets the variable bound at line 374
    however LOCALVIEW_USAGE_model_EmployeesView_lovDepartment1_0 gets a null value and would explain the empty LOV
    Can anybody explain what is happening here ? (and how to use bind variables in LOV queries)
    Regards
    Paul
    (bump)
    Edited by: Paul (MITsa) on Jul 14, 2009 10:46 AM
    I've now tried all types of LOV from ChoiceList to Radio groupe by testing the application module - none of them work.....
    Edited by: Paul (MITsa) on 14-Jul-2009 22:52

    when you rinvoke executeQueryForCollection the bind variables are allready set and they exist in Object[] object2 method parameters.
    in order to change them you need something like:
    private void changeGenericBindVariable(Object[] params, String paramName, Object paramValue) {
    for (int i = 0; i < params.length; i++) {
    if (paramName.equals(((Object[])params)[0].toString()))
    ((Object[])params[i])[1] = paramValue;
    * executeQueryForCollection - overridden for custom java data source support.
    protected void executeQueryForCollection(Object qc, Object[] params,
    int noUserParams) {
    changeGenericBindVariable(params, "pDeptId", "50")
    super.executeQueryForCollection(object, object2, i);
    But its better to set bind variables before you executeQueryForCollection. like when you invoke LOV.
    For cascading LOVs and the problems i have check:
    [http://adfbugs.blogspot.com/2009/07/jdeveloper-11-r1-cascading-lov-bugs.html]

  • How to put variable selection and the query result the same screen

    Dear all,
       how can I put the variable selection and the query result in the same screen? Please advise. Thanks.
    Jin Ming

    Not sure if you are saying you want the prompts on the same page as the results... however in 7.0 with BEx Analyzer, you can insert a text object from the design toolbar and assign it to the variable.... this way, lets say you run query for period 6, then the text object will display "6" on the same area where the query results are.

  • How to include variable on block's query

    I have a block where I fetch data using Query with sub-querry on Query data source name. The problem is that I need to put a variable in a sub-query, but it returned error: ORA-01008 not all variables bound. I'm retrieving multiple records here.
    SELECT DISTINCT --fields
    FROM table1 a, table2 b, table3 c, table4 d
    WHERE a.line_cd = b.line_cd
    AND a.line_cd = 21
    --other conditions
    AND a.clm_seq_no = 7100003
    AND d.eff_dt = (SELECT MAX(eff_dt)
              FROM table4
              WHERE 1=1
              AND srvc_code = a.srvc_code
              AND line_cd = a.line_cd
              AND sched_no = a.sched_no
              AND cover_code = a.cover_code
              AND eff_dt <= :global.variable --problem
    )

    Thanks for your replies.
    Query Data source typy = Table, I also tried using package that serves as handler of global variable (variables.eff_dt) but it gives me error (cannot perform query).
    ( SELECT * FROM (SELECT DISTINCT a.claimant_seq, a.expense_title title,
    NVL(c.max_chrg, 0) max_chrg, NVL(c.min_chrg, 0) min_chrg, DECODE(tran_type, 2,
    a.amount * -1, a.amount) amnt, a.line_cd, a.subline_cd, a.iss_cd, a.clm_yy,
    a.clm_seq_no, a.item_no, a.peril_cd, a.sched_no, a.cover_code, a.srvc_code,
    a.srvc_dtl_code, NVL(a.days, 0) no_days, c.no_days days, NVL(d.min_chrg, 0) MIN,
    NVL(d.max_chrg, 0) MAX, a.dtls_seq, a.limit_amt, a.ctpl_amt, a.excess_amt
    FROM VTPLBI_DTLS a, POL_COVERAGE b, POL_SRVC_DTLS c, pol_services d
    WHERE a.line_cd = b.line_cd
    AND a.sched_no = b.sched_no
    AND a.cover_code = b.cover_code
    AND b.line_cd = d.line_cd
    AND b.sched_no = d.sched_no
    AND b.cover_code = d.cover_code
    AND a.srvc_code = d.srvc_code
    AND a.srvc_code = c.srvc_code(+)
    AND a.line_cd = c.line_cd(+)
    AND a.sched_no = c.sched_no(+)
    AND a.cover_code = c.cover_code(+)
    AND a.srvc_dtl_code = c.srvc_dtl_code(+)
    AND d.eff_dt = (SELECT MAX(eff_dt) --wency05082007
              FROM POL_SERVICES
              WHERE 1=1
              AND srvc_code = a.srvc_code
              AND line_cd = a.line_cd
              AND sched_no = a.sched_no
              AND cover_code = a.cover_code
              AND eff_dt <= variables.v_eff_dt --here is the problem
    UNION SELECT DISTINCT a.claimant_seq, a.expense_title, 0, 0, DECODE(tran_type,
    2, a.amount * -1, a.amount) amnt, a.line_cd, a.subline_cd, a.iss_cd, a.clm_yy,
    a.clm_seq_no, a.item_no, a.peril_cd, a.sched_no, a.cover_code, a.srvc_code,
    a.srvc_dtl_code, NVL(a.days, 0) no_days, 0, 0, 0, a.dtls_seq, a.limit_amt,
    a.ctpl_amt, a.excess_amt
    FROM VTPLBI_DTLS a
    WHERE (a.sched_no = 2 or a.sched_no is null) )
    ORDER BY dtls_seq ) comp_dtl
    Message was edited by:
    Wency

  • Using environment variables in a wmi query

    Hello
    I'm trying to use WMI Queries on Group Policy Preferences to targeting computers on my network.
    I have a file named testfile.txt in Windows directory and I check its last modified date to replace the policy files if the date is older of than current file.
    I set this query : Select * from CIM_DataFile where Name='C:\\Windows\\testfile.txt' and LastModified<'20140910145110.821214+180'.
    The replace action occurs on all machines where windows directory is 'C:\Windows\'. But there are machines on network where windows is installed on directory 'C:\Windows7'.
    So I was thinking to use %WindowsDir% environment variable in the WMI query to ckeck testfile.txt date on the correct directory where windows is installed.
    I've tried different ways to use this environment variable in WMI query with no success (For example: Select * from CIM_DataFile where Name='%WindowsDir%\\testfile.txt' and LastModified<'20140910145110.821214+180').
    Can someone help me with the correct syntax?
    Thanks.

    > I set this query : Select * from CIM_DataFile where
    > Name='C:\\Windows\\testfile.txt' and
    > LastModified<'20140910145110.821214+180'.
    >
    > The replace action occurs on all machines where windows directory is
    > 'C:\Windows\'. But there are machines on network where windows is
    > installed on directory 'C:\Windows7'.
    >
    > So I was thinking to use %WindowsDir% environment variable in the WMI
    > query to ckeck testfile.txt date on the correct directory where windows
    > is installed.
    Short answer: You cannot use environment variables in WMI filters.
    But you can modify your query:
    Select * from CIM_DataFile where (Name = 'C:\\Windows\\testfile.txt' or
    Name = 'C:\\Windows7\\testfile.txt' ) and
    LastModified<'20140910145110.821214+180'
    Event this one should work:
    Select * from CIM_DataFile where Name like 'C:\\Windows%\\testfile.txt'
    and LastModified<'20140910145110.821214+180'
    BTW: The variable should be %windir% anyway, not %windowsdir% :)
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • How to pass variable into lov sql query using like operator

    hi.
    i want to use a lov where i want to pass a variable using like operator.
    my query is
    select empno,name from table where empno like ':ed%';
    my empno is A001 TO A199 AND B001 TO B199 so i want show either A% or B% empno
    how can i do this ?
    reagrds

    kindly press Shift+F1 at a time you face this error to see the exact Oracle error message.
    and provide us with that detail
    and its better if you start new topic for that error... because that will be new error,,,
    -- Aamir Arif
    Edited by: Aamiz on Apr 7, 2010 12:27 PM

  • How Can I use a Variable  in Data Controls query. Frank Kindly check...

    Hii,
    I am using JDeveloper 11g ADF BC.
    My Requirement is that I hv a login screen which is taken from [http://blogs.oracle.com/shay/simpleJSFDBlogin.zip].
    I hv attached BC in this application. I want to use the login usercode in the next pages after login screen. Next screen contains 3 list items which will be populating based on the user. So I created &lt;af:selectOneChoice&gt; using the BC( Just drag & dropped the column into the page from the data controls). But in the data control i want to use this usercode for passing the condition. Now Data is coming without any condition.
    So How can I use the usercode in the Data controls query.
    When I tried to display the usercode in the next page it is showing by binding the value. its code is follows
    &lt;af:outputText value="#{backing_getUser.uid}"
    The program for checking the username & Password is follows.
    package login.backing;
    import oracle.adf.view.rich.component.rich.RichDocument;
    import oracle.adf.view.rich.component.rich.RichForm;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    import oracle.adf.view.rich.component.rich.layout.RichPanelFormLayout;
    import oracle.adf.view.rich.component.rich.nav.RichCommandButton;
    import java.sql.*;
    import java.util.List;
    import java.util.Map;
    import oracle.adf.view.rich.component.rich.output.RichMessage;
    import oracle.jdbc.OracleDriver;
    public class GetUser {
    private RichInputText uid;
    private RichInputText pid;
    private RichCommandButton commandButton1;
    private RichInputText inputText1;
    private RichInputText inputText2;
    public void setUid(RichInputText inputText1) {
    this.uid = inputText1;
    public void setPid(RichInputText inputText2) {
    this.pid = inputText2;
    public RichInputText getUid() {
    return uid;
    public RichInputText getPid() {
    return pid;
    public void setCommandButton1(RichCommandButton commandButton1) {
    this.commandButton1 = commandButton1;
    public RichCommandButton getCommandButton1() {
    return commandButton1;
    public String login_action() {
    // Add event code here...
    String user = this.getUid().getValue().toString();
    // String pass = inputText2.getValue().toString();
    String pid = this.getPid().getValue().toString();
    Connection conn;
    conn = getConnection();
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery ("SELECT usercode FROM guser where usercode = '"+user.toUpperCase()+"' and pwd=F_TEST('"+pid.toUpperCase()+"')");
    if (rset.next()) {
    conn.close();
    return "good";
    conn.close();
    } catch (SQLException e) {
    System.out.println(e);
    return "bad";
    public static Connection getConnection() throws SQLException {
    String username = "ACCTS";
    String password = "ACCTS";
    String thinConn = "jdbc:oracle:thin:@SERVER1:1521:G5PS";
    DriverManager.registerDriver(new OracleDriver());
    Connection conn =
    DriverManager.getConnection(thinConn, username, password);
    conn.setAutoCommit(false);
    return conn;
    public void setInputText1(RichInputText inputText1) {
    this.inputText1 = inputText1;
    public RichInputText getInputText1() {
    return inputText1;
    public void setInputText2(RichInputText inputText2) {
    this.inputText2 = inputText2;
    public RichInputText getInputText2() {
    return inputText2;
    -----

    Hi,
    I didn't look at the example, but if you want to secure your application then you should use container managed security. Read this .
    Anyway, you could add this before return "good"; in your login_action()
    FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("username", user);Then, you can access this from anywhere in the application by using #{sessionScope.username}.
    Pedja

  • How to pass variable to jump to query !

    hello Experts !
    i have a query with variable "Month". so when i run that , user enters the Month/year and it gives the results for "Employee ID" for that month/year.
    i have also creted another query on dso, in order to get detail line item information abt " Employee ID" and join this query with the main one thru RRI.
    in RRI , i have selected "Employee ID" as single value field for both the query. the problem is when i do GOTO from the first query , it does work and gives me the result, but it gives records corresponds to that "Employee id"for all the months and year.
    How do i also pass "Month" - variable value along with that "Employee id" so that the second query only shows line item for that employee id for that selected month.
    thanx

    Hi,
    The use of jump query is to get the detailed level information, for the key figure values which appears in main query.
    This mainly happen when in your cube design you do not details information.
    For example:
    In your main query output you have :
    division , company code , variable amount
    Rec1)10, 1012,4000
    Rec2)20,1001,5000
    Now you want to know what are the document numbers involved to get the variable amount:
    So now , you jump query output will be for record no 1.
    Document number , variable amount
    100001,500
    100002,1000
    100003,2000
    100004,500
    So now you can see that jump query is giving you the documents numbers which are total of 4000.
    Once you have variable in main query , the jump will give details of those keyfigur values only.
    In case of jump query you need not to have any variable , it will automatically take from parant query.
    Though you can define varaible for jump also.
    I hope it clear your doubt
    Thanks
    Mayank

  • How to transfer variable value from one query to another query?

    I create two queries which contain the same variable "Year" and "Month".
    In the wad,Query1 is used to be a table and Query2 is used to show the chart in the condition with the same variable value of Query1
    So I want to transfer the variable  value from query1 to query2.
    Can anyone help me ?

    Let me explain the issue in detail.
    In Query Designer, both the year and  month variables are defined by user exit function to read current year and month and can be modified  during the query runtime.
    In WAD, Query1 is  used  to be a table with a table interface to hyperlink a chart which is defined by Query2 with the same variable value of Query1.
    During the runtime of template, if I change the variable value of Query1 , I want the variable of Query2 to be changed automatically with the same new value.
    So in the table interface of Query1 , I write the ABAP code in "SE24" and related source code to the variable is following:
    concatenate
    'function fire_urlJGSP_Col(filter) {'
    Cl_rsr_www_renderer=>c_lf
    'chart_url="' url '" + "&CMD=LDOC'
    '&TEMPLATE_ID=GCCHART_9' "WEB ID of the work book
    '&PAGEID=Graphics'       "Name of the view
    '&CMD=PROCESS_VARIABLES&SUBCMD=VAR_SUBMIT&VAR_NAME=Z2MYEAR&VAR_VALUE_EXT=" + filter'
    Cl_rsr_www_renderer=>c_lf
    'openWindow(chart_url,"chart_window","dependent=yes","600",'
    '"450","true")'
    Cl_rsr_www_renderer=>c_lf
    into l_coding.
    In this way , I can only transfer the year variable value from Query1 to Query2 and not two variables .
    So , how  shall I do to transer the two variable value in the same?

  • In Openscript I am not able to use a Variable in object Path

    Hi,
    I have an object :
    "/web:window[@title='Repricing Pattern Details -New']/web:document[@name='rhsContent']/web:form[@id='newRepricingPatternRPAT' or @name='repricePatternsForm']/web:select[(@id='selectRPA1' or @name='repricePattern.absoluteRepriceEvent[0].repriceType') and multiple mod 'False']"
    in this 'selectRPA1' and [0] are the numeric value which keeps changing.
    How can I handle this to make the value get changed for every loop.
    I have used below thing, this is not giving any error to me in script but while execution it is saying " Invalid Object Path".
    String OBJ_REPRICING_TYPE = "/web:window[@title='Repricing Pattern Details -New']/web:document[@name='rhsContent']/web:form[@id='newRepricingPatternRPAT' or @name='repricePatternsForm']/web:select[(@id='selectRPA"+LEVEL_ADD+"' or @name='repricePattern.absoluteRepriceEvent["+LEVEL+"].repriceType') and multiple mod 'False']";
    Thanks in advance.
    Regards,
    Abhay

    Hi,
    try using selectRPA* and [*] in your xPath
    ie,
    "/web:window[@title='Repricing Pattern Details -New']/web:document[@name='rhsContent']/web:form[@id='newRepricingPatternRPAT' or @name='repricePatternsForm']/web:select[(@id='selectRPA*' or @name='repricePattern.absoluteRepriceEvent[*].repriceType') and multiple mod 'False']"
    Cheers,
    Deepu M

  • Using System Variables in a SQL Query

    Hi!
    I´m new to Oracle and SQL so i don´t know very much about it.
    There is miy Problem:
    Is there a way to Use the System Variable %USERNAME% in an SQL Query?
    I tried .... where table.shorttag = '%USERNAME%' ;
    but this doesnt work.
    Is Oracle able to handle Systemvariables? Or is there another way to use the current Windows User in an SQL Query.
    It is very Important to use the current Windows user and not the Oracle user.
    Thank you,
    Mfg

    Are you looking for something like this ?
    SQL> SELECT sys_context('USERENV', 'OS_USER') FROM dual;
    SYS_CONTEXT('USERENV','OS_USER
    SAUBBANE\IBM
    SQL> SELECT sys_context('USERENV', 'TERMINAL') FROM dual;
    SYS_CONTEXT('USERENV','TERMINA
    SAUBBANEAlso you can look at the dbms_application_info package.

  • How to bind variables to a LOV query

    Hi,
    I have a page with a messageLOVInput field. I have attached an external LOV with it. The query attached to the LOVregion has a bind parameter which should be replaced by the logged in Person's Business Group ID.
    I have done all the required LOV Mappings etc for a normal LOV.
    If I hardcode the business group ID and then run the page, its working fine. But if I want to bind the businessgroup id at runtime, I am getting an error saying "all variables not bound"
    I tried the usual method of calling some initMethod in AM from the CO of the external LOV region, and then calling some initQuery in the VO to set the bind parameter, but this doesn't work.
    How do I bind variables at runtime with the LOV VO ?
    Thanks, in advance !!
    -Debojyoty

    Hi Deb,
    Heres what you gotta do.
    By default the query is going to be executed in the EO . In case of a query without any bind variables this works fine. This is because for LOV EO's one doenst' have to explicitly call the the executequery method. In your case, there is one bind variable that needs to be set, before any query is fired, either implicitly or explicitly else you are going to get Bind variable not set exception.
    1. Define an init query method in your EOImpl.
    public void initQuery(String p_param)
    setWhereClause(null);
    setWhereClauseParams(null);
    setWhereClauseParam(0,p_param);
    2. Define a method for initializing the query. In your AM IMPL for the LOV, recieve the EOIMPL and call the initquery method and pass the parameter that you would to base the query upon.
    3. In the CO for the LOV, call the AMimpl Method defined in step 2.
    Let me know if this works ? If you still have problems, I will post some sample code.
    Rgds,
    Venkatesh
    Message was edited by:
    Venkatesh

  • How use global variable in other form

    hi master
    sir i define global variable abc in form1
    sir can i use use this global variable abc in form2
    form2 i call from from 1
    please give me idea

    thank's for your reply
    sir i use this method
    i form1
    :global.fatherstatus :=0;
    form2
    :global.fatherstatus :=:accountcode0;
    thanking you

Maybe you are looking for