Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Example Forms

Download the Database Connector Tutorial application. This application contains all of the example forms used in this tutorial. This download is a  application zip file that you can uploaded into your user account. See Application Home Page documentation for more information on uploading this application zip file.

...

In-house Customers should verify the following before beginning the tutorial

  1. The latest tomcat bundle and the Database Connector are installed and are up an running on your in-house server.

Cloud Customers should verify the following before beginning the tutorial

  1. Install and start the Database Connector on your in-house server in Standalone mode.
    Expand
    titleClick here for the details
    1. Download the latest tomcat bundle from the frevvo website.
    2. Extract the files to a location of your choice. We will refer to this directory as <frevvo-home>.
    3. Navigate to the <frevvo-home>\ext\connectors directory.
    4. Unzip the database.zip file to a temporary location of your choice: e.g. c:\tmp. This will create a folder c:\tmp\database. We'll refer to this directory below as <db-tmp>
    5. Copy <db-tmp>\database.war to <frevvo-home>\tomcat\webapps.
    6. Start the Insight server. and then start Live Forms.

      Expand
      titleClick here for the instructions to start the Insight Server and Live Forms

      Insert excerpt
      Planning for v7.2
      Planning for v7.2
      nopaneltrue

    7. Test the connector installation by copying this URL directly into your browser:

      http://localhost:8082/database/status

      After performing these steps you will have:

      • Successfully installed the  database connector and retrieved data from the built-in test database

Cloud Customers should verify the following before beginning the tutorial

  1. Install and start the Database Connector on an in-house server in Standalone mode.

    Expand
    titleClick here for the details
    1. Download the Standalone connector zipfile here.
    2. Unzip the database.zip file to a location of your choice. We will refer to this directory as <db-home>
    3. Install the JDBC driver, if required.
    4. You can start the connector using plain java command or execute one of the files in this directory to install the DB Connector as a Windows service or *nix console instance:
      1. Choose one of these methods to start the connector:
        1. Method 1: Using java in a command window
          1. Navigate to the <directory where you unzipped the database.zipfile>
          2. Type java -jar database.war
        2. Method 2: for Windows OS
          1. Install the DB Connector as a Windows service by double clicking the Install-Service.bat file. Click the Start DBConnector Service.bat to start the service.
        3. Method 2 for *nix OS
          1. Execute the  DB Connector.sh shell script for *nix operating systems.
    5. Test the connector installation by copying this URL directly into your browser:

    http://localhost:8081/database/status

    • Note the standalone connector runs on port 8081 by default. The port number can be changed when you configure the DB Connector in the next step. Use port 8081 to verify that the Db Connector is up and running for now. 
    • Verify that query validation page is loaded with status Passed for the built-in database BIRT and myStore querysets
  2. Verify that the Database Connector is accessible from the frevvo servers.
  3. Login as a designer user. Change the <localhost:8082> in all Rules and Doc URi's in the application to point to the <server:port> where you installed the DB Connector in Standalone mode. Save the changes.

Define a Queryset

The first step would be is to define a queryset and give it a name - BIRT in the configuration.xml file. Since we are using the built-in configuration.xml file, you do not have to do this. Here is an example of the BIRT queryset and the "allCustomers query that is described below.

Code Block
 <query <dbconnector>
    <queryset name="BIRT">
         <query name="allCustomers" autocreate="true">
            <retrieve>
                <statement>
                    SELECT "customerNumber","customerName" from "Customers" order by "customerName"
                </statement>
            </retrieve>
        </query>
    </queryset>
</dbconnector>

The database connector can simultaneously connect to multiple databases; each must be defined in its own queryset. The queryset consists of a resource definition and any number of named queries. The resource definition is shown above for MySQL It is configured in the dbconnector-custom.properties file. You will need to modify it as required: change localhost to the name of the machine running MySQL, specify the MySQL driver, change the database user name and password.

...