Binding to parameters

I have a script with a few parameters that I am currently binding to a data bank (ie CSV file). One of the parameters is a date. Instead of binding to a hard-coded date in a CSV file, I'd like to bind that parameter to the system date. How can I access a pages parameter collection in VB Script? I assume that I need to write some VB script in on of the page handlers and then I bind to that parameter at runtime.
Does anyone have a code snippet?

You could use VBA, but you could also just create an "Internal Variable" that evaluated to an expression, in this case "Date", which evaluates to todays date.
See the attached screenshot.

Similar Messages

  • Problem while Binding multiple Parameters to View Object[Solved]

    Hello,
    I am facing problem while binding multiple parameters with different data types in View Object query. For example suppose I have following query in my view object.
    SELECT Header.ADDED_BY
    Header.BATCH_ID,
    FROM BATCH_HEADER Header
    WHERE :1='deptAdmin' and Header.BATCH_ID
    in
    select batch_id from batch_header_dept_mapping where dept_id in(SELECT * FROM TABLE(CAST(:0 AS TABLE_OF_VARCHAR)))
    I am able to pass the Bind variables of Array type for : 0 , using Steve's ArrayOfStringDomain example. (ArrayOfStringDomain) .
    But after passing value to second bind parameter ie.. :1 .
    I am getting the error as follows.
    ## Detail 0 ##
    java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got CHAR.
    I tried to set
    setWhereClauseParam(1,11); // 11 is Number
    setWhereClauseParam(0,arr); // arr is arr = new Array(descriptor,conn,deptid); for in parameter.
    But of no use , Please let me know if any thing missing form me or have any another solutions. Also please provide me any example if have.
    Thank you,
    Sandeep
    Edited by: user11187811 on Oct 23, 2009 7:27 AM
    Edited by: user11187811 on Oct 26, 2009 12:52 AM
    Edited by: user11187811 on Oct 26, 2009 6:51 AM

    hi.
    but when using non-Oracle named parameter binding styles as you've done (ie. , :1), regardless of what number you give each bind variable, they are sequenced 0, 1, 2 etc. As such your bind variable :1 is the 0th parameter, and your bind variable  is the 1st parameter.Your statment is correct.
    :1 i used was actually on 0th position and :0 was on 1 position. Like you said in sequence 0,1,2 etc. Now i get the answer and i corrected My mistake by assigning right values to right binding variable. and problem just solve.
    Thanks Chris.

  • How to bind korean parameters in XSQL????

    Hi,
    I am binding english parameters in XSQL very well.
    But when I am trying to bind japaneese or korean it is not displaying rows.
    I am giving the sample code.
    hello.xsql
    <?xml version="1.0" encoding="euc-kr"?>
    <xsql:query connection="scs" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:xsql="urn:oracle-xsql" row-element="ADDRESSES_ROW">
    select * from emp where name='{@name}'
    </xsql:query>
    Request: http://hello.xsql?name=JOHN ::: working fine
    Request: http://hello.xsql?name=koreanName :::Not working
    Please help me in this regard.
    How to bind name in korean in XSQL servlet..
    Regards,
    sudhi

    Do you have nlscharset_12.jar in your classpath?
    what web server are you using XSQL with?
    Have you tried using real bind variables like this:
    <xsql:query bind-params="name">
    select * from emp where ename = ?
    </xsql:query>
    Does a query like:
    <xsql:query bind-params="name">
    select * from emp
    </xsql:query>
    return the korean data to the browser correctly?

  • Bind on parameters performance problem

    For some reason when I select bind on parameters in toplink I get a major performance hit for certain queries. I've enabled the toplink performance profiler to log the sql queries.
    I wrote a little Java class that executes these queries using a statement and using a preparedstatement. The prepared statement is fast, so I'm thinking something in toplink is slowing it down. Does anyone have any ideas?
    With bind:
    Begin profile of{ReadAllQuery(model.RKTask)
    INFO [Log4JSessionLog.log()]: SELECT DISTINCT t1.ID, t1.ESTSTARTDATE, t1.HASMSGS, t1.HASRESOLVABLE, t1.PROGSTAT, t1.CSI, t1.ENTEREDBYID, t1.TASKCONSTRAINT, t1.PLANNEDCOMPLETIONDATE, t1.BILLINGRECORDID, t1.PARENTLAG, t1.HANDOFFDATE, t1.PLANNEDREVENUE, t1.INDENT, t1.LASTNOTEID, t1.ESTCOMPLETIONDATE, t1.DURTYPE, t1.MASTERTASKID, t1.WORKPERDAY, t1.CPI, t1.PLANNEDCOST, t1.GROUPID, t1.WORKINGDAYS, t1.MILESTONEID, t1.NUMOPENOPTASKS, t1.CATEGORYID, t1.ORIGINALDURATION, t1.HASNOTES, t1.HASEXPENSES, t1.TEMPLATETASKID, t1.ACTUALDURMINUTES, t1.ENTRYDATE, t1.ACTUALCOMPLETIONDATE, t1.ISCRITICAL, t1.ACTUALSTARTDATE, t1.PARENTID, t1.PERCENTCOMPLETE, t1.RESOURCESCOPE, t1.LASTUPDATEDATE, t1.PROJECTEDCOMPLETIONDATE, t1.CUSTOMERID, t1.ACTUALCOST, t1.APPROVALID, t1.ORIGINALWORKREQUIRED, t1.URL, t1.DURUNIT, t1.COMPLETIONPENDINGDATE, t1.PLANNEDSTARTDATE, t1.DURMINUTES, t1.EAC, t1.AUDITTYPES, t1.COSTAMOUNT, t1.EXTREFID, t1.RESERVEDTIMEID, t1.NAME, t1.ACTUALREVENUE, t1.PARENTLAGTYPE, t1.COSTTYPE, t1.TASKNUMBER, t1.PRIORITY, t1.ASSIGNEDTOID, t1.HASTIMEDNOTIFICATIONS, t1.PROJECTID, t1.ACTUALWORK, t1.WORKREQUIRED, t1.SPI, t1.LASTUPDATEDBYID, t1.STATUS, t1.APPROVALREQUIRED, t1.ROLEID, t1.NUMBEROFCHILDREN, t1.REVENUETYPE, t1.TRACKINGMODE, t1.HASDOCUMENTS, t1.BILLINGAMOUNT, t1.DESCRIPTION, t1.PROJECTEDSTARTDATE, t1.CONSTRAINTDATE FROM T_PROJECTS t0, T_ASSIGNMENTS t2, T_TASKS t1 WHERE ((((((t0.STATUS = ?) AND (t1.STATUS IN (?, ?))) AND (t1.PLANNEDSTARTDATE <= ?)) AND (t2.ASSIGNEDTOID = ?)) OR ((t1.ACTUALCOMPLETIONDATE BETWEEN ? AND ?) AND (t2.ASSIGNEDTOID = ?))) AND ((t0.ID = t1.PROJECTID) AND (t2.TASKID = t1.ID)))
    bind => [CUR, NEW, INP, 1207375200000, 21824, 1206943200000, 1207461599999, 21824]
    Begin profile of{ReadAllQuery(model.RKAssignment)
    INFO [Log4JSessionLog.log()]: SELECT DISTINCT t0.ID, t0.PROJECTID, t0.AVGWORKPERDAY, t0.ASSIGNMENTPERCENT, t0.ROLEID, t0.ASSIGNEDTOID, t0.OPTASKID, t0.ISPRIMARY, t0.WORKREQUIRED, t0.WORKINGDAYS, t0.CUSTOMERID, t0.WORKPERDAY, t0.TASKID FROM T_ASSIGNMENTS t3, T_PROJECTS t2, T_TASKS t1, T_ASSIGNMENTS t0 WHERE (((t0.TASKID = t1.ID) AND (((((t2.STATUS = ?) AND (t1.STATUS IN (?, ?))) AND (t1.PLANNEDSTARTDATE <= ?)) AND (t3.ASSIGNEDTOID = ?)) OR ((t1.ACTUALCOMPLETIONDATE BETWEEN ? AND ?) AND (t3.ASSIGNEDTOID = ?)))) AND ((t2.ID = t1.PROJECTID) AND (t3.TASKID = t1.ID)))
    bind => [CUR, NEW, INP, 1207375200000, 21824, 1206943200000, 1207461599999, 21824]
    Profile(ReadAllQuery,
    class=model.RKAssignment,
    number of objects=2,
    total time=5742,
    local time=5742,
    sql prepare=1,
    sql execute=5736,
    logging=1,
    time/object=2871,
    }End profile
    Begin profile of{ReadAllQuery(model.RKPredecessor)
    INFO [Log4JSessionLog.log()]: SELECT DISTINCT t0.SUCCESSORID, t0.PREDECESSORID, t0.LAGDAYS, t0.DEPENDENCYTYPE, t0.ISCP, t0.LAGTYPE, t0.ISENFORCED FROM T_ASSIGNMENTS t3, T_PROJECTS t2, T_TASKS t1, T_PREDECESSORS t0 WHERE (((t0.SUCCESSORID = t1.ID) AND (((((t2.STATUS = ?) AND (t1.STATUS IN (?, ?))) AND (t1.PLANNEDSTARTDATE <= ?)) AND (t3.ASSIGNEDTOID = ?)) OR ((t1.ACTUALCOMPLETIONDATE BETWEEN ? AND ?) AND (t3.ASSIGNEDTOID = ?)))) AND ((t2.ID = t1.PROJECTID) AND (t3.TASKID = t1.ID)))
    bind => [CUR, NEW, INP, 1207375200000, 21824, 1206943200000, 1207461599999, 21824]
    Profile(ReadAllQuery,
    class=model.RKPredecessor,
    total time=5754,
    local time=5754,
    logging=1,
    sql execute=5753,
    }End profile
    Profile(ReadAllQuery,
    class=model.RKTask,
    number of objects=1,
    total time=17760,
    local time=6264,
    profiling time=1,
    cache=1,
    query prepare=1,
    sql execute=6258,
    object building=4,
    logging=1,
    sql generation=3,
    time/object=17760,
    }End profile
    Without Bind
    Begin profile of{ReadAllQuery( model.RKTask)
    INFO  [Log4JSessionLog.log()]: SELECT DISTINCT t1.ID, t1.ESTSTARTDATE, t1.HASMSGS, t1.HASRESOLVABLE, t1.PROGSTAT, t1.CSI, t1.ENTEREDBYID, t1.TASKCONSTRAINT, t1.PLANNEDCOMPLETIONDATE, t1.BILLINGRECORDID, t1.PARENTLAG, t1.HANDOFFDATE, t1.PLANNEDREVENUE, t1.INDENT, t1.LASTNOTEID, t1.ESTCOMPLETIONDATE, t1.DURTYPE, t1.MASTERTASKID, t1.WORKPERDAY, t1.CPI, t1.PLANNEDCOST, t1.GROUPID, t1.WORKINGDAYS, t1.MILESTONEID, t1.NUMOPENOPTASKS, t1.CATEGORYID, t1.ORIGINALDURATION, t1.HASNOTES, t1.HASEXPENSES, t1.TEMPLATETASKID, t1.ACTUALDURMINUTES, t1.ENTRYDATE, t1.ACTUALCOMPLETIONDATE, t1.ISCRITICAL, t1.ACTUALSTARTDATE, t1.PARENTID, t1.PERCENTCOMPLETE, t1.RESOURCESCOPE, t1.LASTUPDATEDATE, t1.PROJECTEDCOMPLETIONDATE, t1.CUSTOMERID, t1.ACTUALCOST, t1.APPROVALID, t1.ORIGINALWORKREQUIRED, t1.URL, t1.DURUNIT, t1.COMPLETIONPENDINGDATE, t1.PLANNEDSTARTDATE, t1.DURMINUTES, t1.EAC, t1.AUDITTYPES, t1.COSTAMOUNT, t1.EXTREFID, t1.RESERVEDTIMEID, t1.NAME, t1.ACTUALREVENUE, t1.PARENTLAGTYPE, t1.COSTTYPE, t1.TASKNUMBER, t1.PRIORITY, t1.ASSIGNEDTOID, t1.HASTIMEDNOTIFICATIONS, t1.PROJECTID, t1.ACTUALWORK, t1.WORKREQUIRED, t1.SPI, t1.LASTUPDATEDBYID, t1.STATUS, t1.APPROVALREQUIRED, t1.ROLEID, t1.NUMBEROFCHILDREN, t1.REVENUETYPE, t1.TRACKINGMODE, t1.HASDOCUMENTS, t1.BILLINGAMOUNT, t1.DESCRIPTION, t1.PROJECTEDSTARTDATE, t1.CONSTRAINTDATE FROM T_PROJECTS t0, T_ASSIGNMENTS t2, T_TASKS t1 WHERE ((((((t0.STATUS = 'CUR') AND (t1.STATUS IN ('NEW', 'INP'))) AND (t1.PLANNEDSTARTDATE <= 1207375200000)) AND (t2.ASSIGNEDTOID = 21824)) OR ((t1.ACTUALCOMPLETIONDATE BETWEEN 1206943200000 AND 1207461599999) AND (t2.ASSIGNEDTOID = 21824))) AND ((t0.ID = t1.PROJECTID) AND (t2.TASKID = t1.ID)))
    Begin profile of{ReadAllQuery( model.RKAssignment)
    INFO  [Log4JSessionLog.log()]: SELECT DISTINCT t0.ID, t0.PROJECTID, t0.AVGWORKPERDAY, t0.ASSIGNMENTPERCENT, t0.ROLEID, t0.ASSIGNEDTOID, t0.OPTASKID, t0.ISPRIMARY, t0.WORKREQUIRED, t0.WORKINGDAYS, t0.CUSTOMERID, t0.WORKPERDAY, t0.TASKID FROM T_ASSIGNMENTS t3, T_PROJECTS t2, T_TASKS t1, T_ASSIGNMENTS t0 WHERE (((t0.TASKID = t1.ID) AND (((((t2.STATUS = 'CUR') AND (t1.STATUS IN ('NEW', 'INP'))) AND (t1.PLANNEDSTARTDATE <= 1207375200000)) AND (t3.ASSIGNEDTOID = 21824)) OR ((t1.ACTUALCOMPLETIONDATE BETWEEN 1206943200000 AND 1207461599999) AND (t3.ASSIGNEDTOID = 21824)))) AND ((t2.ID = t1.PROJECTID) AND (t3.TASKID = t1.ID)))
    Profile(ReadAllQuery,
    class=model.RKAssignment,
    number of objects=2,
    total time=178,
    local time=178,
    sql execute=153,
    logging=11,
    time/object=89,
    objects/second=11,
    }End profile
    Begin profile of{ReadAllQuery( model.RKPredecessor)
            INFO  [Log4JSessionLog.log()]: SELECT DISTINCT t0.SUCCESSORID, t0.PREDECESSORID, t0.LAGDAYS, t0.DEPENDENCYTYPE, t0.ISCP, t0.LAGTYPE, t0.ISENFORCED FROM T_ASSIGNMENTS t3, T_PROJECTS t2, T_TASKS t1, T_PREDECESSORS t0 WHERE (((t0.SUCCESSORID = t1.ID) AND (((((t2.STATUS = 'CUR') AND (t1.STATUS IN ('NEW', 'INP'))) AND (t1.PLANNEDSTARTDATE <= 1207375200000)) AND (t3.ASSIGNEDTOID = 21824)) OR ((t1.ACTUALCOMPLETIONDATE BETWEEN 1206943200000 AND 1207461599999) AND (t3.ASSIGNEDTOID = 21824)))) AND ((t2.ID = t1.PROJECTID) AND (t3.TASKID = t1.ID)))
    Profile(ReadAllQuery,
    class=model.RKPredecessor,
    total time=91,
    local time=91,
    logging=1,
    sql execute=90,
    }End profile
    Profile(ReadAllQuery,
    class=model.RKTask,
    number of objects=1,
    total time=336,
    local time=67,
    profiling time=2,
    query prepare=1,
    sql execute=62,
    object building=3,
    logging=1,
    sql generation=2,
    time/object=336,
    objects/second=2,
    }End profile

    Iam quessing it could be a combination of 3 things.
    1st the Airport Extreme Base should be the Master and the Express should be the Remote.
    2nd the speed of the XP machine is 1.2Ghz the Mac is 800Mhz and slower.
    in prosessing speed.
    3rd The iMac has an Airport Card that is 802.11b which is slower in transfer rate than the 801.11g of the XP.
    Cheers Don

  • Need to bind 2 parameters on my onLovInit

    Hi again!
    Now I need to bind 2 parameters on my onLovInit.
    I call this function:
    function setBinding(params)
    //this works great
    params["bindParam"]=document.getElementById('VB_Adm110ProgrammesEleves1LKP_ETA_ID_NON').value;
    //Now how can I bind another parameter, something like:
    //params["bindParam2"]=document.getElementById('VB_Adm110ProgrammesEleves1LKP_SEE_ID_NON').value;           
    return true;
    }And in my struts, I have something like:
    <set-property property="whereClause"
    value="TheTable.TheColumn=:1/>
    <set-property property="iterBinding"    value="ProGrillesCheminementsLov1LookupIterator"/>
    <set-property property="bindParams"               value="ProGrillesCheminementsLov1LookupIterator=${param.bindParam}"/>Here, how can I bind the second parameters?
    I hope you can understand! :)
    Thanks for any help!
    Martin

    Martin,
    You are well on your way!
    In onLovInit you have the right code, just uncomment the second line:
    params["bindParam2"]=document.getElementById('VB_Adm110ProgrammesEleves1LKP_SEE_ID_NON').value;
    In the struts-config, you only need to set the bindParams property (which by the way you can generate using the JAG). You can use a comma-delimited list of bind params:
    <set-property property="bindParams" value="ProGrillesCheminementsLov1LookupIterator=${param.bindParam},${param.bindParam2}"/>
    Now, in your View Object where clause definition, you must already include the where clause with bind params, something like :
    column1 = :1 and columns2 = :2
    Steven Davelaar,
    JHeadstart Team.

  • Bug with binding unnamed parameters

    Bug report (I must post it in another place?).
    If OracleCommand.BindByName == true and any of binded parameters has empty name, ExecuteReader raises the exception:
    Exception AccessViolationException:
    Attempted to read or write protected memory. This is often an indication that other memory is corrupt
    I think, this exception must be more intelligible :)

    Hi,
    Theres a bug aleady filed on this (5447495), but it hasnt been addressed yet.
    Cheers,
    Greg

  • Problem binding applet parameters

    Hi,
    I need to pass dynamically generated parameters to applet in ADF Faces page. I need something like this: <applet><param name="n1" value="#{...}"/>. But parameter value doesn't support EL. How can I walk arround this?
    Thanks,

    I have the same problem. In the contrived example below my applet will only work if the EL statement #{row.email} actually gets resolved to the database value, but at the moment the EL text is what is ending up in the applet parameter value. Any further assistance on this would be greatly appreciated.
    <af:column headerText="#{bindings.DepartmentsdepartmentCollection.labels.email}"
    sortable="false" sortProperty="email"
    binding="#{backing_deptEmp.column2}" id="column2">
    <af:outputText value="#{row.email}"
    binding="#{backing_deptEmp.outputText2}"
    id="outputText2"/>
    <f:verbatim>
    <jsp:plugin type="applet" code="com.atrium.agis.AGISApplet" archive="ATRIUMgis.jar"
    height="500" width="750">
    <jsp:params>
    <jsp:param name="method:init" value="'#{row.email}','basemap','http://192.168.10.8/mapviewer/omserver',524966,322570, 750, 400, 81989, 'devplan_jdbc_datasource', 1250,'http://atriumdev/mapviewer/watermark.gif'" />
    </jsp:params>
    <jsp:fallback> This browser does not support Applets. </jsp:fallback>
    </jsp:plugin>
    </f:verbatim>
    </af:column>

  • Value binding with parameters

    Hello
    Is it somehow possible to bind value to back-end data with parameter passing to backend method? See #{databaseConnectionList.delete(dbc)} in the example below. I just need to generate onclick javascripts for each row so if user clicks on the delete action a confirmation dialog box for actual row should display (eg. Are you sure to delete database connection "MyConnection1"?). Please write me the solution, any solution. THANKS A LOT.
    PS: I use MyFaces
    <h:dataTable
         id="databaseConnectionsTable"
         var="dbc"
         value="#{databaseConnectionList.list}">
         ... columns ...
         <h:column>
              <f:facet name="header">
                   <h:outputText value="#{messages.actions}" />
              </f:facet>
              <h:commandLink action="#{databaseConnectionList.delete}" immediate="true" onclick="#{databaseConnectionList.delete(dbc)}">
              </h:commandLink>
         </h:column>
    </h:dataTable>

    Bingo!
    Folks I did figure out the problem. In your environment the vm defaults to Java 1.4, meaning eclipse uses Java 1.4. Now, when you create a new project (as described in steps/clip) using Java 1.5 as the compiler/facet, AppXRay fails to Introspect due to incompatible version.
    Try the following steps to resolve this issue:
    - Correct the JRE used by eclipse,
    Window > Preferences > Java > Installed JREs - If it defaults to JRE/JDK 1.4 version then add JDK/JRE 1.5 and mark it (1.5) as default.- Quit Workshop
    - start > Programs > BEA Workshop > Workshop_Studio_3.x_xxx - Properties - modify Target field to use JDK 1.5 vm
    Ex:
    C:\<Workshop_Home_Dir>eclipse\eclipse.exe -data workspace -feature com.m7.nitrox -application org.eclipse.ui.ide.workbench -vm C:\<j2sdk1.5.0>bin\javaw.exe -vmargs -Xms128M -Xmx512M -XX:MaxPermSize=128M -Dosgi.splashLocation=C:\<Workshop_Home_Dir>Workshop\splash.bmp
    NOTE: Due to the field length limitation, you might have to remove -Dosgi.splashLocation argument.
    - re-launch Workshop
    - retry the steps and you should not hit the reported issue
    FYI:
    - You can refer to Workshop/eclipse log
    * .log within workspace.\.metadata directory
    * workspace\.metadata\.plugins\com.m7.nitrox\wstudio.0.log

  • How to bind/pass multiple input parameters to sql query in BPEL Process

    Hi,
    I have a requirement to invoke a query on a database table to fetch the records based on the few input values or bind variables?
    I have created a Partner link using the DBAdapter service and have used custom SQL, how can i bind and pass multiple bind/input parameters for these queries.
    foreg: if i have to query employee records based on name , desgination and age, these three params would be my input parameter that i will pass when i invoke the BPEL process, bow how can i pass these parameters to the partner link using DBADAPTER service.
    Please help
    Regards

    If the parameter-value is not known beforehand and cannot be determined based on the process instance data at that time, there are 2 options. Either invoke the PL/SQL procedure you named using a DB adapter service to get the value and pass it to the other DB adapter service. Or create a single service (e.g. PL/SQL procedure) that determines the parameter value, executes the query and returns the result. However, this is more a design issue. Does it makes sense to combine these actions in a separate service and use it or are these actions not related? You furthermore state that additional (DB adapter) services make the process heavier. Do you have strict requirements on the time process-instances may run or other such requirements? If not, I think the design-choice on whether combining these actions in a single service should have more priority.

  • Binding Parameters in a Query

    Hi All,
    I figured now that I know more about the actual problem I am having I would post a new message and be a bit more specfic.
    I am using TL 4.6 Build 418, Oracle 8.1 & WLS 7.0.
    I can not get Toplink to bind my parameters. When I simplify my query to the following:
    ReadObjectQuery qry = new ReadObjectQuery(SystemUser.class);
    namedQuery0.setEJBQLString("SELECT OBJECT(sysuser) FROM SystemUser sysuser WHERE sysuser.username = ?1");
    qry.setShouldBindAllParameters(true) ;
    qry.addArgument("username");
    Vector theArgs = new Vector() ;
    theArgs.addElement("[email protected]") ;
    SystemUser su = (SystemUser) clientSession.executeQuery(qry,theArgs) ;
    I get the following in the console - TL does not bind my parameters
    SELECT PASSWORD, USERNAME, SYSTEMUSERID FROM SYSTEMUSER WHERE (USERNAME = ?)
    bind => [null]
    HOWEVER - if I build an expression in this way it does work.
    ExpressionBuilder emp = new ExpressionBuilder();
    Expression myExp = emp.get("username").equal(emp.getParameter("username"));
    ReadObjectQuery query = new ReadObjectQuery();
    query.setReferenceClass(SystemUser.class);
    query.setSelectionCriteria(myExp);
    query.addArgument("username");
    Vector v = new Vector();
    v.addElement("[email protected]");
    SystemUser su = (SystemUser) clientSession.executeQuery(query,v);
    This Works and I get my object! It is the exact same thing, except it isn not EJBQL. The reason I can not use the latter way of getting my object is that we want to create named queries in the MW and use just them in our Java code instead of building expression in code.
    Thanks,
    -Jerry

    In the EJBQL try addArgument("1", java.lang.String.class); instead of addArgument("username")

  • Choosing the parameters to bind

    Hello,
    I am using a function nlssort (by using Expression.getFunction) in "order by" clause of ReadAllQuery. I use anyOf expression to build selection criteria. I want the statement to be prepared, so I call ReadAllQuery.setShouldBindAllParameters(true). Toplink generates "SELECT DISTINCT ... ORDER BY NLSSORT(X, ?)" (with several "?"). Oracle database gives ORA-01791 error. If I call ReadAllQuery.setShouldBindAllParameters(false), it's OK.
    How can I force TopLink to bind all parameters except the last one? What would you recommend to solve this problem (I want the statement to be prepared)?

    I used
            ExpressionOperator exOperator = new ExpressionOperator();
            v.addElement("nlssort(");
            v.addElement(",'" + param+ "')");
           ...

  • Bind Parameters Process Flow ...

    Hi,
    Require to create a Process Flow through OMB+, and then bind some parameters for transformation to paramters defined against Start activity.
    The Process Flow creation is complete, but am not finding a way to bind the parameters. Can anybody share the code.
    Documentation is not very helpful.
    - Jojo

    Aha! It was the Parameters I hadn't got figured out.
    Thanks a lot!
    --Mike                                                                                                                                                                                   

  • How to bind arrays to PL/SQL stored procedure using OCI?

    Hi,
    We are having problems trying to bind arrays to PL/SQL stored procedure using OCI. Here is the situation:
    - We have a stored procedure called "GetVEPFindTasks" with the following interface:
    PROCEDURE GetVEPFindTasks (
    p_ErrorCode OUT NUMBER,
    p_ErrorMsg OUT VARCHAR2,
    p_RowCount OUT NUMBER,
    p_VEPFindTasks OUT t_VEPFindTaskRecordTable,
    p_MaxTask IN NUMBER);
    t_VEPFindTaskRecordTable is a record with the following entries:
    TYPE t_VEPFindTaskRecord IS RECORD (
    RTCID NUMBER,
    TransNum NUMBER,
    TransTimestamp VARCHAR2(20),
    Pathname1 image_data.pathname%TYPE,
    Pathname2 image_data.pathname%TYPE,
    Pathname3 image_data.pathname%TYPE,
    OperatorID operator.id%TYPE);
    - Now, we are trying to call the stored procedure from C++ using OCI (in UNIX). The call that we use are: OCIBindByName and OCIBindArrayOfStruct to bind the parameters to the corresponding buffers. We bind all parameters in the interface by name. Now, we do bind the record's individual item by name (RTCID, TransNum, etc.), and not as a record. I don't know if this is going to work. Then, we use the bind handles of the binded record items (only record items such as RTCID, TransNum, and NOT error_code which is not part of the record) to bind the arrays (using OCIBindArrayOfStruct).
    All of the parameters that are binded as arrays are OUTPUT parameters. The rest are either INPUT or INPUT/OUTPUT parameters. Now, when we try to execute, OCI returns with an error "Invalid number or types of arguments" (or something to that sort... the number was something like ORA-06550). Please help...
    Is there any sample on how to use the OCIBindArrayOfStruct with PL/SQL stored procedures? The sample provided from Oracle is only for a straight SQL statement.
    Thank's for all your help.
    ** Dannil Chan **

    As you said:
    You have to pass in an array for every field and deconstruct/construct the record in the procedure. There is no support for record type or an array of records. Can you give me a example? I'am very urgently need it.
    thanks
    email: [email protected]

  • Bind Variable reuse in GROUP BY queries

    We have several queries that are rather large (in are opinion, that is) and they each have 10 '?' place holders for binding JDBC parameters. These queries also use bind variables in the WHERE and GROUP BY clauses. Eventhough there are 10 bind variable place holders ('?'), there are only 3 distinct values needed.
    So...in TOAD or SQL*Plus, we run the queries and "reuse" the same three bind variables and the query works fine. If we use 10 different bind variables, filled with the 3 values, we get a an error, "not a GROUP BY expression."
    We would like to make these calls as JDBC PreparedStatements and bind the parameters at run time, so that we could take advantage of the statement cache and increase performance. But...since JDBC parameter binding seems to be positional, we seem to be getting 10 different bind variables at runtime in the PreparedStatement call. Is there a way to "reuse" the bind variables that JDBC is binding at runtime?
    Regards,

    Yep...that is what we are doing. We have a work around that is to manually replace the ? with string data and then pass the query in complete. It will work fine for us. I was just checking the alternatives. The query is large, but the offending code is:
    ...( select distinct T3.ptcpt_cd,trunc(new_time(T1.start_dt_gmt, 'GMT', ?)) trade_date,
    sum(decode(T1.sttl_item_num, 10, T1.sttl_item_qnty, 0)) DA_CHARGE_MW,
    sum(decode(T1.sttl_item_num, 10, T1.sttl_item_amt, 0)) DA_CHARGE_AMT,
    sum(decode(T1.sttl_item_num, 30, T1.sttl_item_qnty, 0)) BAL_CHARGE_MW,
    sum(decode(T1.sttl_item_num, 30, T1.sttl_item_amt, 0)) BAL_CHARGE_AMT,
    sum(decode(T1.sttl_item_num, 20, T1.sttl_item_qnty, 0)) DA_CREDIT_MW,
    sum(decode(T1.sttl_item_num, 20, T1.sttl_item_amt, 0)) DA_CREDIT_AMT,
    sum(decode(T1.sttl_item_num, 40, T1.sttl_item_qnty, 0)) BAL_CREDIT_MW,
    sum(decode(T1.sttl_item_num, 40, T1.sttl_item_amt, 0)) BAL_CREDIT_AMT,
    T3.source_cd Source
    from nm_sttl_item_dtl T1, nm_settlement T2, nm_sttl_statement T3
    where trunc(new_time(T1.start_dt_gmt, 'GMT', ?)) between to_date(?,'mm/dd/rrrr') and to_date(?,'mm/dd/rrrr')
    and sttl_item_num in (10, 20, 30, 40)
    and (sttl_item_qnty <> 0 and sttl_item_amt <> 0)
    and T1.sttl_id = T2.sttl_id
    and T2.statement_id = T3.statement_id
    and T3.ptcpt_cd = 'FAC'
    and T3.source_cd = AREA'
    group by T3.ptcpt_cd,trunc(new_time(T1.start_dt_gmt, 'GMT', ?)), T3.source_cd)...

  • How to pass value to some view parameters for a nested combo, on load ? 11g

    Hi, I have a requirement for to do two combos, in a master-detail relationship.
    The first one it's a very simple combo, a simple query in DB, so far so good. The second one depends on first and depends either from the username, that I get from a Payload binding (two parameters in where clause).
    In the first activity on my flow it's work very well. The user chooses the "idMaster", a valueChangeListener event runs an ExecuteWithParams OperationBinding and fills up the nested combo.
    But, I've tried in some many ways to fill both combos and bring in their previously selected values, in the next task, but until now I'm not able to do that. I believe that I have to, somehow, call ExecuteWithParams before setting the defaut value. It's this the correct approach ? I tried it on managed bean constructor, but it not works.
    So, how can I call a VO, passing parameters values into it, fill this nested combo, and set this pre-selected value, before pages load?
    Any ideias?
    Thanks.

    Continue here

Maybe you are looking for

  • I can't get rid of iTunes match

    Hi everyone, I have a rather strange problem with my iTunes match. After having it for about two years my subscription recently expired and I did not renew it. I don't know if I have to defend my decision, but basically what it boils down to is that

  • Outlook 2003 Calendars do not appear in iTunes 7.3

    Sorry to rehash this issue... If I connect my iPhone to my PC and look at the info tab for the Calendars section iTunes says Sync calendars from Outlook (the only choice in the drop-down), but it is defaulted to All Calendars (Selected Calendars is g

  • Ranger, a textbased filemanager

    Update: There's now an IRC channel, #ranger on freenode! Update: Check out ranger's github page too: http://github.com/hut/ranger There's all the information you need: The README, the source code, a download link. Ranger, a filemanager made for comfo

  • Multiple driver program and forms - Reg

    Hai Gurus,                we are using Ecc.5.0 last 5 years. At present we are using out put Excise Invoice printing programs through menu based. The out put printing program are now desinged distribution channel wise.so, now we have arround 5 progra

  • [svn:fx-4.0.0] 13444: TLF Build 589.

    Revision: 13444 Revision: 13444 Author:   [email protected] Date:     2010-01-12 07:42:57 -0800 (Tue, 12 Jan 2010) Log Message: TLF Build 589.  Accept fixes for 2518934 and 2522433. Both are serious problems involving common use-cases of the IME and