TOC PREV NEXT INDEX



Add Database Connectivity


It's fairly rare that a servlet that merely reports on the data that was sent in on a form is needed. It is much more common to get data from a Database and report the results. To do that, a Database connection and SQL Statement must be added to the servlet.

  1. Select the JDBC tab of the Simplicity Enterprise Module Palette.
  2. Drag a Connection Module up to the Modules area of the tree on the left side of the Enterprise Composer Window and drop it between the Form Module and the XMLExport Module.

Note that the red line that indicates where the icon can be dropped will appear immediately below the Form Module's highest node, not under the Properties sub-node. Again, if the icon is dropped in the wrong location, it may be moved simply by dragging the node to the desired location.

  1. Select the Properties node of the JDBCConnection Module. This will make the JDBC Connection Module Property sheet appear on the panel to the right of the Enterprise Composer.

Simplicity Enterprise includes a demonstration version of the PointBase database server (The demonstration is limited to databases of 5 megabytes in size). If the database has not already been started in the earlier steps, you can start the database server by choosing Start PointBase Demonstration Database Server from the Servers menu in the IDE Window. A dialog box will appear on the screen telling you that the server has started. Click on OK to dispose of the window and continue.

Once the database server has been started, it can be connected to as follows:

  1. In the JDBC Connection Property sheet of the Enterprise Composer window, there is a JDBC Driver field. The JDBC driver field lets you specify which JDBC driver your database requires. Select 'com.pointbase.net.netJDBCDriver' if it is not already selected.
  2. The URL to connect to: field should point to the computer where the database server is running. The URL jdbc:pointbase://127.0.0.1/sample will connect to the sample database that comes with Simplicity Enterprise. This should already be entered into this field.
  3. Press the connect button at the bottom of the screen to connect to the database server. After a few seconds, you should see the message 'Connected to PointBase JDBC Driver' next to the button and the button's name will change to Disconnect.

You have now connected the database editor to a database.


Data Representations, Inc.
http://www.datarepresentations.com
support@datarepresentations.com
sales@datarepresentations.com
TOC PREV NEXT INDEX