Using the JdbcSource applet user interface
The JdbcSource applet has a simple user interface that can be turned on or off by using the allowui PARAM tag or using the allowui property in script. This interface can be very useful for testing database operations.

The interface lets you provide and set the following database operation information:

The JdbcSource applet user interface looks like this:

User Interface Example

The user interface lets you enter the following database operation information:

Interface Field/Button Name Description
Host Field Specifies the name of the IP host machine. Enter the name of the machine from which the JdbcSource applet was downloaded or enter "localhost" if you are running a local copy of JdbcSource. The value of host will replace any occurance of "%HOST%" in the database URL (see below.) For testing you may want to type in a different "host".
Driver Field Specifies the name of the JDBC driver.
Load/Unload Button The label on this button alternates between "Load" and "Unload". Clicking on Unload causes the applet to forget it has loaded a driver (a private variable is set to null, this does not actually unload the .class file). Clicking on "Load" causes the JdbcSource applet to load or re-load the driver. This can be helpful if there is some problem loading the driver and you want to force JdbcSource to perform the load operation.
DB Field Specifies the database to connect to. You can create a drop-down list of databases to choose by supplying a "Jdbc Sources" text file (for an applet using Symantec's dbANYWHERE JDBC driver, this is dbawsrcs.txt.) Selecting a database from the "titles" choice box will fill in the URL box. You can also type a full URL in the URL box.
URL Field Specifies the URL of the database you are connecting to.
User Field Specifies the user ID required for connecting to the specified database.
Password Field Specifies the user password required for connecting to the specified database.
Current Field Specifies the database that you are currently connected to.
Connect/Disconnect Button When you click on the Connect button, the applet looks for "%HOST%" in the currently specified database URL. If that is present, it replaces that with the current value in the Host box. If %HOST% does not occcur in the database URL, whatever you typed in the Host TextField has no effect.

The applet then attempts to connect to the specified database. (Note: Applet security restrictions may prevent you from connecting to a machine other than the one from which the JDBC driver classes were downloaded. This means that when running a local copy of the applet, you may not be able to connect to the machine on which the middleware is running, and when running the applet downloaded from a Web server you can only connect back to the middleware process running on that Web server. When the applet connects, the button then displays as Disconnect. Clicking on the Disconnect button closes the current database.

Query Field Provides an area where you can type in an SQL statement when carrying out a database query.

Also, after successfully connecting to a database, a list of "table types" may displayed. Clicking on one or more of these "table types" and then clicking on the "List Tables" button will display a list of tables of the specified types. Double-clicking on a table name will generate a simple SQL statement ("select * from table") where table is the name you double-clicked. (Note: Not all JDBC drivers and database backends support this feature.)

DataItem Field Specifies the data item to be published to the InfoBus. After the query is executed successfully, a resulting ArrayAccess data item is announced to the InfoBus using this name. For example, if there is a Chart applet on the current HTML page and that Chart is listening for a DataItem named "Sales", entering "Sales" here before executing a query would publish a "Sales" data item for Chart to consume.
Result Style Field Specifies the format of each resulting data set returned from a query.
Debug Window Displays debug and log messages and lets you set the level of detail displayed in the messages. This window is displayed when the enableDebugWindow PARAM tag is set to True.