Forum Stats

  • 3,874,172 Users
  • 2,266,676 Discussions
  • 7,911,751 Comments

Discussions

Using MySQL DB and JDeveloper ADF Application - View Criteria Search contains operator not working

User_ML1NR
User_ML1NR Member Posts: 2 Green Ribbon

I am Migrating ADF web application from oracle DB to MySql DB. ( Using glassfish 3.1.2.19 and JDeveloper 12.1.3 and mysql-connector-java-5.1.29 and mysql Ver 14.14 Distrib 5.7.31). I am facing issues in view criteria LOV search operation with contains operator. For soma case changing Database to in memory in View criteria working fine .. But for some cases it is not working. There is no resemblance in working and not working cases too. Kindly help us on this.

Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,919 Red Diamond

    What exactly is not working?

    Describe the query and the outcome in detail, please.

    Timo

  • User_ML1NR
    User_ML1NR Member Posts: 2 Green Ribbon

    I am using view criteria search in my Lov as defined below and using contains operator . This screenshot is working for starts with and give data for BUD/6/

    but when i search like/6/ in the same LOV View criteria its not fetching any data.

    I am also attached the view criteria here


  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,919 Red Diamond

    The question is how the SQL statement for the search is built. Have you checked the final SQL statement sent to the DB?

    Does this statement return the correct data when you use some SQL Tool to query the DB?

    You can loot at https://tompeez.wordpress.com/2011/06/02/dump-vo-query-and-its-parameter-with-their-values/ to see how this can be done.


    Timo

  • Eric v.M.
    Eric v.M. Member Posts: 25 Bronze Badge

    When you initialized your business components project you chose the SQL platform. By default this is set to "Oracle", so the generated sql follows Oracle syntax/flavor. When using another database this property should to be set to the appropriate value.

    According to the JDev help:

    "Select the type of SQL your application will use. For an application running against an Oracle database, you can usually accept the default. When you set the SQL platform, you also set the type SQLBuilder class. In a single JVM, only one type of SQLBuilder can be used. Although the default for an Oracle database connection is always the Oracle SQL platform, other supported SQL platforms you can choose include OLite (for the Oracle Lite database), SQLServer for a Microsoft SQLServer database, DB2 for an IBM DB2 database, and SQL92 for any other supported SQL92-compliant database.

    Note: You can select the SQL platform in this dialog only when you first initialize your business components project. After you initialize the project, you can override the SQL platform in the overview editor for the adf-config.xml file. You can locate the file in the Application Resources pane by expanding the Descriptors-ADF META-INF folder"

    See "How to Initialize the Data Model Project With a Database Connection" in https://docs.oracle.com/en/middleware/developer-tools/adf/12.2.1.4/develop/getting-started-adf-business-components.html#GUID-5A85985B-58AB-4198-9057-296C52823A2D for more information.