...
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.
...
Install and start the Database Connector on an in-house server in Standalone mode.
Expand title Click here for the details - Download the Standalone connector zipfile here.
- Unzip the database.zip file to a location of your choice. We will refer to this directory as <db-home>
- Install the JDBC driver, if required.
- 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:
- Choose one of these methods to start the connector:
- Method 1: Using java in a command window
- Navigate to the <directory where you unzipped the database.zipfile>
- Type java -jar database.war
- Method 2: for Windows OS
- 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.
- Method 2 for *nix OS
- Execute the DB Connector.sh shell script for *nix operating systems.
- Method 1: Using java in a command window
- Choose one of these methods to start the connector:
- 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
- Verify that the Database Connector is accessible from the frevvo servers.
- 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 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.
...