Passing JSP value into an SQL Query

Hi,
I am developing a site for a cruise ship company as part of a project. My problem is as follows . . .
I have a page called cruiseReservation.jsp which passes the value of the selected cabin to the cruiseDetails.jsp page:
href="CruiseDetails.jsp?cabin_id=cabinE105 " so . .
cabinE105 was selected.
my database table for the cabin is as follows:
create table cabin (
cruise_id number primary key,
cabinE105 number,
cabinD113 number,
cabinC131 number,
cabinB127 number,
cabinA101 number,
FOREIGN KEY(cruise_id)
REFERENCES cruisedetails(cruise_id)
In the cruise details page im running the following code to update the cabin tables cabinE105 value to 0:
String cabin = request.getParameter("cabin_id");
String setCabin = "update cabin set '"+cabin+'" = 0 where cruise_id = 1";
What im trying to do is pass the value of the cabin into the update statement so it updates cabinE105 = 0 where cruise_id = 1.
How do I dfo this as the above method is not working ??
I would like any help on this PLEASE !!! THANKS !

String cabinID = request.getParameter("cabin_id");
PreparedStatement ps=connection.prepareStatement("update cabin set "+cabinID+"=? where cruise_id=?");
ps.setInt(1,0);
ps.setInt(2,0);
ps.executeUpdate();
.Regards
-John-

Similar Messages

  • How to pass a value into a SQL Query?

    Hi There,
    I want to know if there is a possibility to pass a dynamic value in a sql query. For example I have a currency rate value (ex: rate = 1.319, 2.23 etc) which user wants to input when running the query (The rate is not taken from the system, so I cannot compare to any table column and pass it as a parameter).
    And this rate has to be used in my query to do some calculation. Is this possible? The value :p_currency_rate doesn't work
    Any ideas please?
    Thank you,
    Prathibha

    SELECT DISTINCT
    hou.name
    ,poh.segment1 po_num
    ,pol.line_num po_line_num
    ,poh.currency_code
    --,trunc(poh.creation_date) po_creation_date
    ,pol.cancel_flag
    ,msi.segment1 item_num
    ,pol.unit_price
    ,round(cost.item_cost,5)
    ,round((&p_rate * pol.unit_price),5) "CONVERSION"
    ,(cost.item_cost - round((&p_rate * pol.unit_price),5)) difference
    ,pov.vendor_name
    FROM
    po.po_headers_all poh
    ,po.po_lines_all pol
    ,po.po_vendors pov
    ,hr.hr_all_organization_units hou
    ,inv.mtl_system_items_b msi
    ,bom.cst_item_costs cost
    WHERE
    poh.po_header_id = pol.po_header_id
    and pov.vendor_id = poh.vendor_id
    and poh.org_id = hou.organization_id
    and hou.organization_id = :p_operating_unit
    and poh.currency_code = :p_currency
    and poh.creation_date between :po_creation_date_from and :po_creation_date_to
    and poh.type_lookup_code = 'BLANKET'
    and msi.inventory_item_id = pol.item_id
    and cost.INVENTORY_ITEM_ID = pol.ITEM_ID
    --and (cost.item_cost - pol.unit_price) <> 0
    and (cost.item_cost - round((&p_rate * pol.unit_price),5)) <> 0
    and cost.organization_id = 1
    and msi.organization_id = 1
    and cost.cost_type_id = 3 --- Pending cost type
    and nvl(upper (pol.closed_code),'OPEN') not in('CANCELLED', 'CLOSED', 'FINALLY CLOSED', 'REJECTED')
    and nvl(upper (poh.closed_code),'OPEN') not in('CANCELLED', 'CLOSED', 'FINALLY CLOSED', 'REJECTED')
    and nvl(pol.cancel_flag, 'N') = 'N'
    and &p_rate user parameter
    I want this p_rate to be passed as a user parameter.

  • Passing a string into an SQL query IN statement

    Hello,
    I need to connect to a database to pull some data to dynamically create a form based on the data I pull back. My SQL query works fine when I manually run it through a SQL client tool, but when I try to pass it through my workflow I'm having trouble with passing my string into the IN part of the statement. So if for example my SQL query is:
    SELECT Field1, Field2, Field3 FROM Table1 WHERE Field4 IN (?)
    I have a process variable that has the string I'm trying to pass into the ?, but I don't seem to be able to get the query to run. I have tried setting up my query to run as a Parameterized Query (passing my string process variable into the ?), and by setting the query up through xPath (where I am calling my process variable with an xPath declaration), but am not having any luck.
    The process variable I am trying to pass is formatted such that I'm passing 'Value1','Value2','Value3' but I can reformat this string if need be. Even with using test data I can't get the query to return anything. For test data I have tried: 'Value1','Value2','Value3' ; Value1','Value2','Value3 ; Value1,Value2,Value3 but the query never returns any data. I can't seem to see how to format the string to pass into the query. The Query will work with a single Value in the test data, but as soon as I try to pass multiple values within the string it fails. Any suggestions?

    The problem looks to be a limit on what I can pass into the SQL query component. My string is coming from data returned from another database. I take the xml output from that database call, pass it through a set variable component to remove my xml tags from the string, and then format the string in a script component (I have to do it this way because of the way the data coming out of my first database call). I've put in loggers, and can see that the string I'm passing into my query that is giving me problems, is formatted the same way as if I were to use the concat function Scott listed above. It looks like there is a limitation on what can be passed in my variable. I have tried creating my entire SQL query statement in a set variable component, and then just calling the process variable that holds that statement, but there is a character limit of 128 character for what can be passed in a variable through xpath in the SQL query component.
    The next thing I tried was changing my SQL where clause. Instead of passing my variable directly into the IN statement I set up a PATINDEX('%:'+countyname+ ':%', ?) > 0 call to check for the values in my database call. As you can see I took out the "," that I was passing as part of my string, thinking that the SQL component was getting confused by them, and placed ":" characters around my values being passed in my string variable. No matter what I try to do though I'm not able to get the query to run. The component looks like it is taking my string, and is seeing the whole thing as a string instead of passing it as individual values within a string.
    I think I'm getting close, but I keep getting a Content not allowed in prolog exception in the server logs.

  • Passing user parameter into your sql query

    I've created two user parameters...'Order_date_from' and 'Order_date_to'
    I've written a simple query to list the total order amount, order number, party name and ordered date
    Select sum ((unit_selling_price)*(ordered_quantity)), count(line_number), oe_order_headers_all.order_number, hz_parties.party_name, oe_order_headers_all.ordered_date
    from oe_order_lines_all,
    oe_order_headers_all,
    hz_parties,
    hz_cust_accounts
    where oe_order_lines_all.header_id=oe_order_headers_all.header_id
    and oe_order_headers_all.sold_to_org_id = hz_cust_accounts.cust_account_id
    and hz_cust_accounts.party_id = hz_parties.party_id
    group by order_number, party_name, ordered_date;
    I want to know how I can pass the value for the above mentioned parameters into my sql query so that it reflects as the 'ordered_date' in the report and only shows the data for the dates that the user inputs.
    Any feedback would be appreciated. Thanks.

    I want to know how I can pass the value for the above
    mentioned parameters into my sql query so that it
    reflects as the 'ordered_date' in the report and only
    shows the data for the dates that the user inputs.
    Any feedback would be appreciated. Thanks.And how does the "user" input these dates?

  • Passing request value into a query

    Hi,
    I was wondering whether it was possible to pass a request value into a report query in apex 3.2.
    I have a button with a submit value of "ALL" which when pressed i need to open up all the contents of a query as opposed to on those that have been completed.
    SELECT *
    FROM TABLE
    WHERE (STATUS = 'COMPLETE' OR :REQUEST = 'ALL')
    I was expecting this to return only completed records, unless the Button is pressed and then I want to return all records regardless of status.
    Can someone please advise whether this will work? At present it does not seem to recognise the request.
    Cheers,
    ca84

    query could not be parsed: select "ASCIDD" "ASCIDD", "TEMIDD1" "TEMIDD1", "NAME" "NAME", "LSTIDD1" "LSTIDD1", "ASCORDOPT"
    "ASCORDOPT", "ASCORD" "ASCORD", "TEMIDD2" "TEMIDD2", "TEMDES_COUNT" "TEMDES_COUNT" from ( /* Formatted on 2010/12/06
    15:23 (Formatter Plus v4.8.8) */ SELECT ascidd, temidd1, (SELECT temdes FROM lsttem WHERE temtyp = 'D' AND lsttem.temidd =
    temidd1) NAME, lstidd1, ascordopt,ascord,TEMIDD1 TEMIDD2, CASE (:REQUEST) WHEN 'COUNT' THEN
    LSTTEM_PKG_1.CountRecords(TEMIDD1) ELSE 0 END "TEMDES_COUNT" FROM lsttemasc WHERE lstidd1 = :p355_lstidd and exists
    (select 'y' from lsttem where bizidd1 = :P355_BIZIDD1 and lsttem.TEMIDD = lsttemasc.TEMIDD1) order by ascord;) apex$_rpt_src
    failed to parse SQL query: ORA-00911: invalid characterThe ";" looks very suspicious...
    And please:
    <li>Update your forum profile with a better handle than "user13453962"
    <li> DON'T post unrelated questions as follow-ups to existing threads. This issue is not connected to the OP.

  • How to pass the Bound values to VO SQL Query during runtime?

    Hi all,
    I have the following sql query;
    SELECT NOTIFICATION_ID
    FROM xx_NOTIFICATION_V
    WHERE COMPANY = NVL(:1, COMPANY)
    AND INITIATOR = NVL(:2,INITIATOR)
    AND PAYGROUP = NVL(:3, PAYGROUP)
    AND SOURCE = NVL(:4, SOURCE)
    AND SUPPLIER_NAME = NVL(:5,SUPPLIER_NAME)
    AND TRX_DATE BETWEEN NVL(:6,TRX_DATE)
    AND NVL(:7,TRX_DATE)      
    If i click GO button on search page then it pass the selected Poplists values as a Bound values to VO Sql query at runtime after this I store the search results in a Table(Which is created by using New Region Wizard).
    I want to pass the Bind parameter values to VO SQL query during runtime and :1,:2,:3,:4,:5,:6,:7 values are coming from Poplists.
    I search through forum I found many threads regarding Bind Values but those all are passing ID's only not String(Varchar) values.
    How to pass the Character values to VO Query.
    Please anyone help me on this.
    Thanks in Advance.

    Hi All,
    Below one is the recent error Stack.
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT NOTIFICATION_ID
    , COMPANY
    , PAYGROUP
    , SOURCE
    , INITIATOR
    , SUPPLIER_NAME
    , TRX_DATE
    FROM LMG_NOTIFICATION_V
    WHERE COMPANY = NVL(:1,COMPANY)
    AND INITIATOR = NVL(:2,INITIATOR)
    AND PAYGROUP = NVL(:3,PAYGROUP)
    AND SOURCE = NVL(:4,SOURCE)
    AND SUPPLIER_NAME = NVL(:4,SUPPLIER_NAME)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:544)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:366)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:328)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:363)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:330)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2121)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
         at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
         at OA.jspService(OA.jsp:45)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01008: not all variables bound
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2548)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2933)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:650)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:578)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:627)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:515)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3289)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:1207)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4146)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:567)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:537)
         at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:614)
         at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3253)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3240)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:411)
         at oracle.apps.fnd.framework.webui.OAWebBeanBaseTableHelper.queryData(OAWebBeanBaseTableHelper.java:960)
         at oracle.apps.fnd.framework.webui.beans.table.OATableBean.queryData(OATableBean.java:717)
         at ls.oracle.apps.fnd.wf.worklist.webui.WorklistFindCO.processRequest(WorklistFindCO.java:78)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:518)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:366)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:328)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:363)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:330)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2121)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
         at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
         at OA.jspService(OA.jsp:45)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    java.sql.SQLException: ORA-01008: not all variables bound
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2548)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2933)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:650)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:578)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:627)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:515)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3289)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:1207)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4146)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:567)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:537)
         at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:614)
         at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3253)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3240)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:411)
         at oracle.apps.fnd.framework.webui.OAWebBeanBaseTableHelper.queryData(OAWebBeanBaseTableHelper.java:960)
         at oracle.apps.fnd.framework.webui.beans.table.OATableBean.queryData(OATableBean.java:717)
         at ls.oracle.apps.fnd.wf.worklist.webui.WorklistFindCO.processRequest(WorklistFindCO.java:78)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:518)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:366)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:328)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:363)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:330)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2121)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
         at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
         at OA.jspService(OA.jsp:45)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    Please anyone help me on this?
    Thanks

  • Checkbox as a query item - how do I get its value into my SQL

    I have a search region where the user enters some parameters to filter the records returned from the query. I have a checkbox that represents Active or Inactive. I created it using the APEX_ITEM.CHECKBOX function. So if checked I want the sql to order by Active records else if unchecked to order by inactive records after they press the submit button. So how do I get the checked or unchecked value from this checkbox into my SQL query.
    Message was edited by:
    ca114422

    You can have a look here:
    http://htmldb.oracle.com/pls/otn/f?p=31517:99
    There is an example on how to include various item values
    into your query.
    By the way, what is your name?
    Denes Kubicek

  • Passing an argument in the SQL Query of a View Object

    Hi,
    It is possible that this question has been asked before, however I have searched for a half an hour in the forums and couldn't find a solution.
    I am also new to using JDeveloper and ADF. Here's the situation:
    I am developing an application that doesn't have to do anything else then displaying data from a database. Pretty straightforward actually.
    Now I have made a vew pages with several collapsible panels (af:showDetailHeader) and have setup the datasources (or so I thought).
    All that remains is:
    - drag & drop a view object, from the application module that I created, onto the collabsible panels, so a child element gets created which displays data from the database.
    - hack the layout so it looks like I want it to.
    The problem that I have is the following:
    I am using a 'User'-class that contains values I need when quering the database.
    That User-object is part of a user-session.
    What I want, for example, is to use the 'getPersonId()' function of that User-object and pass the argument to a SQL-query of a certain view-object.
    The query would become something like:
    'SELECT * FROM people WHERE people.personId = :someNumber'.
    Now I've read some stuff about variable binding, which is complemented by something like (backing bean code):
    getDBTransaction().getRootApplicationModule().getACertainViewObject().setWhereClauseParameter(1, user.getPersonId());
    The examples I have found that might match my wishes are not using business components, but EJB's. I am having difficulty with understanding the 'how'-part of variable binding.
    Also, I do not know enough of ADF to be able to create a situation like:
    'User loads page, collapsible panel 1 is fully shown, the others are undisclosed.'
    (meaning, that for panel1 a query has been executed.)
    'User clicks on collapsible panel 2 which triggers a backingbean that somehow retrieves data from a view object'.
    I would appreciate any help that somebody can give.
    If it is not too much of a problem, please provide code snippets in case you have a solution. I am new to ADF :(.
    -edit
    I am using JDeveloper 10.1.3.3.0 in case that is of any importance.
    Message was edited by:
    Hugo Boog

    Hello Stijn,
    I didn't think about a referenced bean rule in the faces-config.
    I added it right away and I am now able to set parameters of a View-object, not using a page button and before the page loads. You made my day!
    In case anyone ever reads this post again, the summary of how to generate a table based on a View-object using dynamic parameters.:
    1a: Go to faces-config.xml -> Overview tab'
    1b: Go to the menuitem "Referenced Beans"
    1c: Click on 'new' and select the existing bean you want to access data from and input a name. In this example I use name="user"
    2: Create a View-object using the wizard.
    2a: Specify the query you want in the menuitem 'SQL Statement'.
    Add the 'parameters' you want to. You will have something like:
    "SELECT * FROM someTable WHERE table.columnname LIKE :someArgument".
    - hint: if you want the result to become something like:
    "SELECT * FROM someTable WHERE table.columnname LIKE '%someArgument%'" then you have to add the '%'-characters in your code itself (read: someClass.setParameter("%" + someArgument);).
    2b: In the menuitem 'Bind Variables' you have to add the variables you are referring to in the query. If you look at the query in 2a, then you have to add a variable with name "someArgument".
    2c: Add the View-object to a Application Module (create one if nessecairy).
    3a: Open a .jsp(x) file. Drag the View-object created in step 2 from the 'Data Controls'-pane to the page.
    3b: Click on the '+' of the View-object in the 'Data Controls'-pane and open 'Operations' and drag 'ExecuteWithParams' to your page as a button.
    3c: We do not want to use a button, the action has to be executed immediatly. So In the page source remove the lines that were created after dropping 'ExecuteWithParams'.
    3d: Right-click on the page and select "Go to Page Definition".
    3e: Go to the action id that is called 'ExecuteWithParams#', where # is a number.
    Change the id to something useful.
    3f: Change the NDValue so it corresponds with the value you want.
    Example:
    <action id="getAddressData" IterBinding="AddressesView1Iterator"
    InstanceName="MyHRServiceModuleDataControl.AddressView1"
    DataControl="MyHRServiceModuleDataControl" RequiresUpdateModel="true" Action="95">
    <NamedData NDName="someArgument" NDType="java.lang.String"
    NDValue="#{user.personId}"/>
    </action>
    Note: It is possible to use the value of a Backing Bean in NDValue.
    Note 2: user is the bean I referred to in the faces-config.xml!
    3g: Under the executables item, add an 'invokeAction' to pass the parameter to the View-object before your JSP-file loads:
    <executables>
    <invokeAction Binds="getAddressData"
    id="loadAddressDataOfPersonIdInSession"
    Refresh="prepareModel"/>
    Thank Stijn Haus for this :)

  • How can I pass a value into a page fragment?

    How can I pass a value into a page fragment?
    I am implementing four search screens. And the only thing different about them will be their backing bean.
    So I’d like to do something like have four pages, each which retrieves its appropriate backing bean, sets that bean to a variable, and then includes a page fragment which contains the generic search page code (which will make use of that variable).
    The code in the four pages would be something like this:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:c="http://java.sun.com/jsp/jstl/core">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <c:set var="searchPageBackingBean"
    value="#{pageFlowScope.employeeSearchPageBean}"
    scope="page"/>
    <jsp:include page="./SearchPageBody.jsff"/>
    </jsp:root>
    At this point, what I’m seeing is that the fragment page, SearchPageBody.jsff, has no visibility of the searchPageBackingBean variable, either referencing it as #{pageFlowScope.searchPageBackingBean} or just #{searchPageBackingBean}

    The following will work, assuming you are needing to access a managed bean:
    Put this in the parent page:
    <c:set var="nameOfSearchPageBackingBean"
    value="employeeSearchPageBean"
    scope="request"/>
    Put this in the child, SearchPageBody.jsff:
    <c:set var="searchPageBean"
    value="#{pageFlowScope[nameOfSearchPageBackingBean]}"
    scope="page"/>

  • How could I replace hard coded value in my sql query with constant value?

    Hi all,
    Could anyone help me how to replace hardcoded value in my sql query with constant value that might be pre defined .
    PROCEDURE class_by_day_get_bin_data
         in_report_parameter_id   IN   NUMBER,
         in_site_id               IN   NUMBER,
         in_start_date_time       IN   TIMESTAMP,
         in_end_date_time         IN   TIMESTAMP,
         in_report_level_min      IN   NUMBER,
         in_report_level_max      IN   NUMBER
    IS
      bin_period_length   NUMBER(6,0); 
    BEGIN
      SELECT MAX(period_length)
         INTO bin_period_length
        FROM bin_data
         JOIN site_to_data_source_lane_v
           ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
         JOIN bin_types
           ON bin_types.bin_type = bin_data.bin_type 
       WHERE site_to_data_source_lane_v.site_id = in_site_id
         AND bin_data.start_date_time     >= in_start_date_time - numtodsinterval(1, 'DAY')
         AND bin_data.start_date_time     <  in_end_date_time   + numtodsinterval(1, 'DAY')
         AND bin_data.bin_type            =  2
         AND bin_data.period_length       <= 60;
      --Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
      --report.
      DELETE FROM edr_class_by_day_bin_data;
       SELECT site_to_data_source_lane_v.site_id,
             site_to_data_source_lane_v.site_lane_id,
             site_to_data_source_lane_v.site_direction_id,
             site_to_data_source_lane_v.site_direction_name,
             bin_data_set.start_date_time,
             bin_data_set.end_date_time,
             bin_data_value.bin_id,
             bin_data_value.bin_value
        FROM bin_data
        JOIN bin_data_set
          ON bin_data.bin_serial = bin_data_set.bin_serial
        JOIN bin_data_value
          ON bin_data_set.bin_data_set_serial = bin_data_value.bin_data_set_serial
        JOIN site_to_data_source_lane_v
             ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
            AND bin_data_set.lane = site_to_data_source_lane_v.data_source_lane_id
        JOIN (
               SELECT CAST(report_parameter_value AS NUMBER) lane_id
                 FROM report_parameters
                WHERE report_parameters.report_parameter_id    = in_report_parameter_id
                  AND report_parameters.report_parameter_group = 'LANE'
                  AND report_parameters.report_parameter_name  = 'LANE'
             ) report_lanes
          ON site_to_data_source_lane_v.site_lane_id = report_lanes.lane_id
        JOIN (
               SELECT CAST(report_parameter_value AS NUMBER) class_id
                 FROM report_parameters
                WHERE report_parameters.report_parameter_id    = in_report_parameter_id
                  AND report_parameters.report_parameter_group = 'CLASS'
                  AND report_parameters.report_parameter_name  = 'CLASS'
             ) report_classes
          ON bin_data_value.bin_id = report_classes.class_id
        JOIN edr_rpt_tmp_inclusion_table
          ON TRUNC(bin_data_set.start_date_time) = TRUNC(edr_rpt_tmp_inclusion_table.date_time)
       WHERE site_to_data_source_lane_v.site_id = in_site_id
         AND bin_data.start_date_time     >= in_start_date_time - numtodsinterval(1, 'DAY')
         AND bin_data.start_date_time     <  in_end_date_time   + numtodsinterval(1, 'DAY')
         AND bin_data_set.start_date_time >= in_start_date_time
         AND bin_data_set.start_date_time <  in_end_date_time
         AND bin_data.bin_type            =  2
         AND bin_data.period_length       =  bin_period_length;
    END class_by_day_get_bin_data;In the above code I'm using the hard coded value 2 for bin type
    bin_data.bin_type            =  2But I dont want any hard coded number or string in the query.
    How could I replace it?
    I defined conatant value like below inside my package body where the actual procedure comes.But I'm not sure whether I have to declare it inside package body or inside the procedure.
    bin_type     CONSTANT NUMBER := 2;But it does't look for this value. So I'm not able to get desired value for the report .
    Thanks.
    Edited by: user10641405 on May 29, 2009 1:38 PM

    Declare the constant inside the procedure.
    PROCEDURE class_by_day_get_bin_data(in_report_parameter_id IN NUMBER,
                                        in_site_id             IN NUMBER,
                                        in_start_date_time     IN TIMESTAMP,
                                        in_end_date_time       IN TIMESTAMP,
                                        in_report_level_min    IN NUMBER,
                                        in_report_level_max    IN NUMBER) IS
      bin_period_length NUMBER(6, 0);
      v_bin_type     CONSTANT NUMBER := 2;
    BEGIN
      SELECT MAX(period_length)
        INTO bin_period_length
        FROM bin_data
        JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
                                           site_to_data_source_lane_v.data_source_id
        JOIN bin_types ON bin_types.bin_type = bin_data.bin_type
       WHERE site_to_data_source_lane_v.site_id = in_site_id
         AND bin_data.start_date_time >=
             in_start_date_time - numtodsinterval(1, 'DAY')
         AND bin_data.start_date_time <
             in_end_date_time + numtodsinterval(1, 'DAY')
         AND bin_data.bin_type = v_bin_type
         AND bin_data.period_length <= 60;
      --Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
      --report.
      DELETE FROM edr_class_by_day_bin_data;
      INSERT INTO edr_class_by_day_bin_data
        (site_id,
         site_lane_id,
         site_direction_id,
         site_direction_name,
         bin_start_date_time,
         bin_end_date_time,
         bin_id,
         bin_value)
        SELECT site_to_data_source_lane_v.site_id,
               site_to_data_source_lane_v.site_lane_id,
               site_to_data_source_lane_v.site_direction_id,
               site_to_data_source_lane_v.site_direction_name,
               bin_data_set.start_date_time,
               bin_data_set.end_date_time,
               bin_data_value.bin_id,
               bin_data_value.bin_value
          FROM bin_data
          JOIN bin_data_set ON bin_data.bin_serial = bin_data_set.bin_serial
          JOIN bin_data_value ON bin_data_set.bin_data_set_serial =
                                 bin_data_value.bin_data_set_serial
          JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
                                             site_to_data_source_lane_v.data_source_id
                                         AND bin_data_set.lane =
                                             site_to_data_source_lane_v.data_source_lane_id
          JOIN (SELECT CAST(report_parameter_value AS NUMBER) lane_id
                  FROM report_parameters
                 WHERE report_parameters.report_parameter_id =
                       in_report_parameter_id
                   AND report_parameters.report_parameter_group = 'LANE'
                   AND report_parameters.report_parameter_name = 'LANE') report_lanes ON site_to_data_source_lane_v.site_lane_id =
                                                                                         report_lanes.lane_id
          JOIN (SELECT CAST(report_parameter_value AS NUMBER) class_id
                  FROM report_parameters
                 WHERE report_parameters.report_parameter_id =
                       in_report_parameter_id
                   AND report_parameters.report_parameter_group = 'CLASS'
                   AND report_parameters.report_parameter_name = 'CLASS') report_classes ON bin_data_value.bin_id =
                                                                                            report_classes.class_id
          JOIN edr_rpt_tmp_inclusion_table ON TRUNC(bin_data_set.start_date_time) =
                                              TRUNC(edr_rpt_tmp_inclusion_table.date_time)
         WHERE site_to_data_source_lane_v.site_id = in_site_id
           AND bin_data.start_date_time >=
               in_start_date_time - numtodsinterval(1, 'DAY')
           AND bin_data.start_date_time <
               in_end_date_time + numtodsinterval(1, 'DAY')
           AND bin_data_set.start_date_time >= in_start_date_time
           AND bin_data_set.start_date_time < in_end_date_time
           AND bin_data.bin_type = v_bin_type
           AND bin_data.period_length = bin_period_length;
    END class_by_day_get_bin_data;

  • Retreiving a value from and SQL query

    If anyone can give me sample code or pointers to retreive a value from an sql query, I'd be greatful.
    Source code I've muddled together so far:
    Class seqNumType = Class.forName(nameOfClass);
    Constructor theConstructor = seqNumType.getConstructor(null);
    Object seqNumInstance = theConstructor.newInstance(null);
    String theStatement = "SELECT value INTO v_seqnum FROM DUAL;";
    OracleCallableStatement ocs = (OracleCallableStatement)conn.prepareCall(theStatement);
    ocs.registerOutParameter( 1, OracleTypes.NUMBER, 0);
    Method method = seqNumInstance.getClass().getMethod("getORADataFactory", null);
    seqNumInstance = ocs.getORAData(1, (ORADataFactory)method.invoke(null,null));
    ocs.execute();
    Problem with this seems to be the ORADataFactory isn't a method of the class, but as I'm thumbling around in the dark here a little, I've no idea where to go from here. Is this just generally overkill anyway?
    Suggestions?
    Cheers for any help.

    Like this:
                ResultSet resultSet=statement.executeQuery("SELECT * FROM TEST");
                while(resultSet.next())
                    for(int i=0;i<resultSet.getMetaData().getColumnCount();i++)
                        System.out.print(resultSet.getObject(i+1).toString()+" ");
                    System.out.println();

  • Can't pass a parameter to an SQL Query

    I've looked for about an hour or more now on the web, java.sun.com, but can't find what I need:
    I have a page called display.jsp, and I call it from the browser
    http://localhost/display.jsp?libnum=1
    In the page I have the following code:
    <sql:query var="profileQuery" dataSource="${profileDS}">
    SELECT * FROM singles.profile where libnum=?
    <sql:param value="${libnum}"/>
    </sql:query>
    However, the database sees the query as
    " SELECT * FROM singles.profile where libnum=null"
    So, my question is how do I make this line work ? :
    " <sql:param value="${libnum}"/> "
    can you help ?
    thanks !
    Dennis

    Dude .....
    Here's my code now -- solved it... phew..
    Just to think of it ... what a difference between "libnum" and "param.libnum". That was like 3-4, if not 5 hour difference for me.
    <sql:query var="profileQuery" dataSource="${profileDS}">
    SELECT * FROM singles.profile where libnum=?
    <sql:param value="${param.libnum}"/>
    </sql:query>
    Dennis

  • Passing multiple values to a BI query

    Hi experts,
    This question has probably been asked a few times, but I have an issue with passing multiple values to a BI query.  Here's the scenario....
    1)  I have created a BI query.  When I test the query in VC I can enter values 1000:1100 in the Infoobject Business Area and I see that the values are passed through OK
    2)  Then I created a form where Business Area is an Input Field
    3)  I linked the form to the BI query and assigned value @Business_area
    3)  A table is linked to the BI query to view my result ( I have set a distinct before my table to view the data by fiscal year period)
    4) When running the VC model, the table show values for 1000 and 1100, but when I enter 1000:1100 and Submit it does not show both the business areas
    There must be something I am missing and I thought it was that in my submit string (between the input form and the BI query) that I should fill in some values (instad of @Business_area). I tried to fill in 1000:1100, but then I get an error saying Invalid time 1000:1100.
    I would really appreciate any help on this issue :-).
    Regards,
    Thomas

    Hi Thomas,
    I wish to enter default values for dates onto the VC form. Ie I have a VC report to display a customer's shipped data. Ship date is a selection field/ input field on the form for the report/ output table.
    At present if a user clicks submit they get all their shipped records from the beginning of time till today. How can I restrict the dates at VC level to past  3months? So if the users don't specify a ship date, they get the past 3 months data, and afterwards they can change it an retrieve all the data or past 2 years as they wish.
    Thanks,
    Jasmine

  • How to pass src value into img tag in ADF

    Hi,
    My Dev : 11.1.2.3.0
    How to pass row values into <img> tag.,I used the below code but it's taking empty.,
    I tried both ways like #{row.CdFilePath}   and   ${row.CdFilePath}
    <af:iterator var="row"
                      value="#{bindings.xxx.collectionModel}"
                     id="i2">
         <img src='/ShowImage?src=#{row.CdFilePath}' border='0' style="width:100px; height:100px; margin:5px;"/>
    </af:iterator>
    Please tell me any other option is there..
    Thanks

    This works if you use a normal table so I guess it should work here too.
    Are you sure the el #{row.CdFilePath} return something?
    Why don't you use the adf image tag <af:image source="/ShowImage?src=#{row.CdFilePath}".../> instead of the html img tag?
    Should the src property not be enclosed with " instead of your '?
    Timo

  • How i can pass the value into 1 line

    Hi expert,
    how do i pass all the value for sales document flow item in one line?
    i'm using this function
    CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
        EXPORTING
          aufbereitung  = '2'
          belegtyp      = i_del-vbtyp
          comwa         = l_comwa
          nachfolger    = ' '
          vorgaenger    = 'X'
          v_stufen      = '50'
        TABLES
          vbfa_tab      = lt_vbfa
        EXCEPTIONS
          no_vbfa       = 1
          no_vbuk_found = 2
          OTHERS        = 3.
    so now lt_vbfa already got data line by line....
    line 1 : contract : 00010 : 1000000 : 19,000.00
    line 2 : order     : 00010 : 2000000 : 10000.00
    line 3 : delivery : 00010 : 3000000 : 10000.00
    how i can pass the value into 1 line?
    for example :
    contract  | line     | amount     | Order     | line     | amount    | delivery   | line     | amount     |
    1000000 | 00010| 19,000.00 | 2000000 |00010 | 10000.00 | 3000000 | 00010 | 10000.00 |
    Edited by: anuar jusoh on Aug 17, 2009 4:02 AM

    Hi,
    What is requirement for passing the data in a single line ? Do you finally need to append the same in the internal table and pass it in the module ?
    You can create an internal table of type 1000 character and can loop the existing internal table. Then you can append the Work area in a single line and can finally append it to the table.
    DATA : ITAB type standard table of char1000.
    Loop at <existing table>.
    concatenate table work area wa_char100 into Itab_char_1000.
    endloop.
    APPEND itab_char_1000 into itab.
    Hope this helps.
    Thanks,
    Samantak.

Maybe you are looking for

  • Process chain failing (due to back ground jobs)

    Dear Friends   Did anybody help me in this topic.   The DTP's of the particular process chain is failing frequently. The reason is background jobs causing error why this happens every time? Did parallel data loading in the DTP may cause any backgound

  • How to create Services in ADF

    Hi , I have requirement to create independent services in ADF , which when called, independently complete the tasks of putting or fetching data from the Database., irrespective of the page defs from where it is called. For example a Look up service,

  • Adobe Reader 11.0.05 not available for distribution???

    Anyone know when this will be available please? I don't want to roll out an 'old' version if a new version is available. Thanks

  • How to restrict "Open Applications" window from showing C drive? Or use the Windows Explorer "Open" Window?

    Hi, Im new to JDeveloper and I work in a school which requires restriction of the C: Drive. Does any one know how I can either stop the "Open Applications" dialog from showing this drive or Use the Windows Explorer "Open" dialog window to browse file

  • Cannot download Adobe Reader 9

    I have tried several times to download the Adobe Reader version 9 on to my PC, but I keep getting error message 1714 : The older version of Adobe Reader 9 cannot be removed. This is strange as the old Adobe Reader was version 7. I am totally confused