How to do a like parameter in a databinding to a table

I have a simple two page sample, where on the first page I have a text box. I want to take the text from this text box and do a LIKE conditional in my sql where clause. Here is how I am trying to set the sql parameter but I get an sql error java.sql.SQLException: [sunm][SQLServer JDBC Driver]Invalid parameter binding(s).
getSessionBean1().getPatchesRowSet2().setObject(
1, patchName.getText());
I even tried
getSessionBean1().getPatchesRowSet2().setObject(
1, "%"+patchName.getText()+"%");
but got the same error

Still not luck, still getting Invalid parameter bindings error
here is my try block and the two things suggested I have tried without success. The column patch is a varchar(255) in MSSQL
try
tmpStr = "case3";
log("%"+patchName.getValue().toString()+"%");
/*getSessionBean1().getPatchesRowSet2().setObject(
1,"%"+patchName.getValue().toString()+"%");
command="select * from patches where patch like '%"
+ patchName.getValue().toString()
+ "%'";
getSessionBean1().getPatchesRowSet2().setCommand(command);
//getSessionBean1().getPatchesRowSet2().execute();
//patchesDataProvider2.refresh();
catch (Exception e)
log("Stack Dump:[[["+e+"]]]");
Here is the error message on the web browser
Description: An unhandled exception occurred during the execution of the web application. Please review the following stack trace for more information regarding the error.
Exception Details: org.apache.jasper.JasperException
java.sql.SQLException: [sunm][SQLServer JDBC Driver]Invalid parameter binding(s).
Possible Source of Error:
Class Name: org.apache.jasper.servlet.JspServletWrapper
File Name: JspServletWrapper.java
Method Name: service
Line Number: 384
Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.

Similar Messages

  • How to use select options whitout ranges ie like parameter

    how to use select options whitout ranges ie like parameter and pls send me the code on that
    thanks
    raja.

    hi,
    SELECT-OPTIONS : s_kunnr for kna1-kunnr <b>no intervels.</b>
    eg: code
    <b>SELECT-OPTIONS : s_kunnr for kna1-kunnr <b>no intervels.</b></b>
    data: itab type table of kna1 with header line.
    select * from kna1 into table itab where kunnr IN s_kunnr.
    rgds
    Anver

  • How to find the correct Parameter Id

    hi
    below is my code...
    i have the report in ALV grid display...
    wn i double click on the materail number i want to get the "Basic data 1" screen but my problm is wn i click on the material it is displaying the view selections tab i dont want it to be displayed...
    i hav written below code..
    wt is wrong in my code?
    and tell me exactly how can i find the Parameter ID for a perticular screen....
    FORM F01_ALV_EVENT_USER_COMMAND
      USING COMMAND LIKE SY-UCOMM
            SELFIELD TYPE SLIS_SELFIELD.
          ENDIF.
          CLEAR wa_final-aufnr.
        WHEN 'PLNBEZ'.
          READ TABLE IT_FINAL INTO WA_FINAL INDEX SELFIELD-TABINDEX.
          IF SY-SUBRC EQ 0.
            SET PARAMETER ID 'MAT' FIELD WA_FINAL-PLNBEZ.
            CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
          ENDIF.
    Regards
    Smitha

    Hi Smitha,
    I worked on the similar example that you have stated.....
    You try using this way...
    You are assinging the parameter id write....i think the field that you are clicking check the value and then compare that value and proceed this way....it will work....
    get cursor field fs_lips-vbeln value w_data.
      if fs_lips-vbeln  ne 'FS_LIPS-VB'.
        message 'Click on Delivery Number Only'(004) type 'E'.
      endif.
      set parameter id 'VL' field w_data.
      call transaction 'VL02N' and skip first screen.
      commit work.
      wait up to 10 seconds.
    Regards.

  • In OBIEE 11G, how to get the special parameter created by JAVA?

    Hi Experts,
    In OBIEE 11G, how to get the special parameter created by JAVA?
    For example:
    In JAVA , it has set one parameter named 'test'.
    So how to get the parameter in filter area in OBIEE?

    Hi Kobe,
    No P2 holds the parameter name like PresentationTable.ColumnName, in your form you may go for complete name or just column name and before submitting the form you can define the Action url.
    I would suggest to read section 6.3.2.1.
    ex:
    <SCRIPT LANGUAGE="JavaScript">
    changeAction(url) {
    var TestVar = form.inputbox.value;
    document.this_form.action="saw.dll?Go&Path=/Shared/Test/SB2&Action=Navigate&P0=1&P1=like&P2=Customers.Region&P3="+TestVar;
    </SCRIPT>
    </HEAD>
    <BODY>
    <FORM NAME="myform" ACTION="" METHOD="GET">Enter something in the box: <BR>
    <INPUT TYPE="text" NAME="inputbox" VALUE=""><P>
    <INPUT TYPE="button" NAME="button" Value="Click" onClick="changeAction(this.value)">
    </FORM>
    If helps pls mark.
    Edited by: veeravalli on Oct 24, 2012 10:25 AM

  • How to use array as parameter in procedure

    Hello,
    I am using Oracle SQL Developer 1.5.5
    I wanted to write a procedure which does insert into table.
    It should take 2 parameters.How to take array as parameter?
    One is a array of strings ('abc','def','erg') and another is a varchar ('abc').
    How to do this?
    Can somebody pls give a small example?
    Thanks
    Edited by: user13305573 on Aug 5, 2010 11:27 PM

    Hello,
    I am sorry if u didnt get my point.
    My req is i am using Orcale SQL Developer.
    Db is Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    I want to write a procedure which will be called from a java file.
    The parameter to that procedure will be a arr(array of strings) and username(varchar).
    I want to insert that data into a tableA.
    like if parameters are
    (abc01,edfg02,efg03) as arr and honey as username
    then it should insert 3 rows to the tableA
    abc01 honey
    edfg02 honey
    efg03 honey
    Thanks
    Edited by: user13305573 on Aug 5, 2010 11:54 PM

  • How to use the out parameter of a transformation

    Hi All,
    I have a requirement where I need to move all the transformations from process flows to map.SO for each transformation I need to have 1 map which calls this transformation.I have 1 transformation which has both input and output parameter.If I use this transformation in mapping then how to use the out parameter of thsi transformation.This out parameter needs to beused in other mappings.Can soemone please help me.
    Thansk in advance

    Hi,
    I'm not quite sure what you are trying to do.
    What works: Connect the outgroup of a pre- or post-mapping process operator to the mapping output parameter operator..
    What does not work: Connect the outgroup of an operator that can return more than one row (e.g. table operator, filter, joiner ,...) to the mapping output parameter operator. The mapping output parameter just returns "one row", like a pl/sql function call.
    You cannot pass a "data stream" from one mapping to another. Maybe the pluggable mappings is what you are looking for.
    Regards,
    Carsten.

  • How can I insert a parameter to the layout template?

    How can I insert a parameter defined in report to the layout template? just like insert a field. I wanna display the parameter in the output.

    If its Ebiz, concurrent program.
    Put this in your template in the starting,
    where the P_BUSINESS_GROUP_ID is one of the concurrent program parameters,
    <?param@begin:P_BUSINESS_GROUP_ID?>
    and then you can access the parameter in your rtf like <?$P_BUSINESS_GROUP_ID?>
    Upload the rtf template back into apps.
    and then rerun the conc pgm :)

  • Omniportler HTML Layout - How do I pass a parameter to another page?

    How do I pass a parameter to another page from an HTML Layout like I can with the Tabular layout?

    If I have a parameter I can pass it from one page to another, i.e. if I have a list of customers and I want data for that particular customer alone, I can create a page parameter form or an omniportlet where I would then pass the value of that portlet to the page. I would use a string like the following: https://test.test.com/test/page?_pageid=536,7483646&_dad=portal&_schema=test&customer=##CUSTOMER_NAME##

  • LinkToAction how to use it with parameter?

    Hello,
    searching for tutorials about the use of the LinkToAction I have seen that here is a possiblity in WD4J to use a context-node.
    How can you pass a parameter in WD4A? (I am using a rowrepeater for a list of books and would like to pass the bookID to the event)
    How can I do this?
    Thanks a lot,
      Vanessa

    Thanks for your answer Lekha,
    unfortunaltely I don't get the point.
    >
    Lekha wrote:
    > From this action if you want to export the bookid then it should be a exporting parameter..
    >
    > you can specify this way...
    Somehow I don't get the point. How can I pass the bookid to the method?
    I have a rowrepeater. One of the elements is the link to the action. I will add the bookid as parameter. That is clear.
    My problem is how to connect the bookid of the row that is displayed to the method? Is it just because of the name? I don't see any context I can associate?
    Could you please go a little bit more in detail,
      Vanessa

  • How to use ET_ATTACH importing parameter Function module BBP_PD_SC_CREATE

    hi,
    how to use ET_ATTACH importing parameter of Function module BBP_PD_SC_CREATE, my requirement is to create SC with attachment.
    an example would really help.
    Kind Regards,
    Kailash.

    Hi,
    Generally we create the SC from ITS or Portal, and there in the Create SC screen , once you add the item into the shopping cart , in the Item details, there is the section called , Documents and Attachements, where in you can upload the attachments which ever you want. Sometimes the extn .DOC, .pdf and .xls are allowed. but that also you can check which are the Authorized files extns avaialbe in Backend R/3.
    Using the FM RFC_READ_TABLE, in table pass TDWP and in the i_field pass 'APPSFX' and then you can get the authorized file formats. in Backend Transaction DC30 you can verify which are the allowed file formats.
    Moreover for restricting the User from uploading the attachment BADI BBP_ITEM_CHECK_BADI can be implemented for raising the error message if required.
    Regarding the ET_ATTACH, it is the structure of type BBPT_PDS_ATT_T,  so you have to provide the complete details for this structure. Like : GUID, P_GUID ,LOGICAL_SYSTEM, DESCRIPTION, URL, TYPE,DISP_URL, PHIO_EXT ,etc.
    Once all the entries are fine.
    You can create the SC, but the recommeded way for creating the SC is thru ITS or Portal.
    I hope this will help. Feel Free while asking questions.
    Thanks and Regards,
    Ankur Goyal

  • How to create ''from to '' parameter in XL reporter for templates

    Hi,
    How to create ''from to '' parameter in XL reporter for templates
    Can anyone help me in this regard
    thanks,
    Suresh Kannan

    Suresh,
    1. Goto Report Designer
    2. there u can find "Advanced Report Builder" on left side of the window
    3. At the below u can find three buttons like "Parameters", "Properties","Apply"
    4. Click on "Parameters"
    5. then Parameters window will populate
    6. Click the new Button
    7. Name: give as u like
    Category: Literal
    Type: Date
    Attribute: Leave blank
    Default Vale: Leave Blank
    Prompt: From Date
    This is the process to create the parameters.

  • How do I hide the Parameter header?

    My report looks like:
    How can I hide this parameter header?
    Ryan D

    Please go through the following Blog
    http://bimoron.blogspot.in/2011/10/ssrs-passing-parameters-to-report-and.html
    you have to set the rc parameter to hide the report parameters
    Surender Singh Bhadauria
    My Blog
    I think property value should be collapsed
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to set different view parameter programmatically in the same task flow

    Hello everyone,
    I have a view activity A that calls another view activity B with a link. In this link the action is set to a method (I use JSFUtils class: http://jdeveloper-adf.googlecode.com/svn/trunk/TGPrototype2/ViewController/src/com/tgslc/defaultManagement/utils/JSFUtils.java):
    public String goToB() {
    String paramToPass = "someParameterTakenInSomeWay";
    JSFUtils.setExpressionValue("#{pathToViewB_pageBPageDef.paramName}",paramToPass);
    return "openActivityB";
    where openActivityB is the control flow case to call B.
    In the B pageDef file I have set a parameter "paramName" without any value:
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="11.1.1.59.23" id="pageBPageDef">
    <parameters>
    <parameter id="paramName"
    value=""/>
    </parameters>
    <executables/>
    <bindings/>
    </pageDefinition>
    But at running time I have a oracle.jbo.expr.JIEvalException:
    JBO-25077: Name paramName not found in the specified object: pathToViewB_pageBPageDef.
    The question is: how can I set the parameter programmatically from the view activity A?
    Note that I use this method to set the parameter because in the real application I have many "view activity A" that will call B, but all of these have to set this parameter.
    I use JDeveloper 11.1.1.4.
    Thanks in advance,
    Baduel

    Hi,
    this is because PageDef B represents a binding container that is not active to the time you try to call it. The binding container becomes available when navigating to the page but not before. Instead:
    1. define a managed bean in pageFlowScope and expose a setter/getter method to hold the value to pass on
    2. Reference the managed bean in pageFlowScope from the attributebinding NDValue property using EL
    3. Set the managed bean value before navigating to view B
    Frank

  • How to use the "out" parameter in idl

    hello.idl:
    module HelloApp
    interface Hello
    string sayHello();
    void getPass(in string name,out string pass);
    HelloServer:
    public class HelloServer
    class HelloServant extends _HelloImplBase
    public void getPass(String name,org.omg.CORBA.StringHolder pass)
    System.out.println("Server pass = " + pass);
    if (name.equals("lxh"))
    pass = new org.omg.CORBA.StringHolder("1234");
    if (name.equals("cbj"))
    pass = new org.omg.CORBA.StringHolder("5678");
    HelloClient:
    public class HelloClient
    public static void main(String args[])
    try{
    org.omg.CORBA.StringHolder Pass = null;
    if (args.length == 1)
    System.out.println("Client pass = " + args[0]);
    helloRef.getPass(args[0],Pass);
    System.out.println(Pass);
    } catch(Exception e) {
    When I run client main method with parameter "lxh",I will get a error says the getPass() parameter which has given is wrong.
    How to use the out parameter in client?

    Does this error only occurs if you pass "lxh" or always?
    Did you try passing a StringHolder Object rather than a NULL Object?
    Perhaps you can post the error message!?

  • How to remove a grobal parameter in SAP memory

    As known to all, we can use SET/GET PARAMETER to pass parameters among multiple programs.
    Now I'm just curious about how to remove a grobal parameter in SAP memory, and how can I get the list of all grobal parameter in SAP memory.
    Any idea?

    Hi william,
    1. how to remove a grobal parameter in SAP memory
      Well, i dont think we can REMOVE.
       At most, we can RESET it to blank(initial)
    2. set parameter  id 'BUKRS' FIELD ''.
    regards,
    amit m.

Maybe you are looking for