The JdbcSource Applet
This topic is divided into the following sections:

For more general information on data access and how it is handled with eSuite applets, refer to the "eSuite and Data Access" topic.

Overview of the JdbcSource applet

The JdbcSource applet is a data access applet that lets you do the following:

Once the JdbcSource applet loads a JDBC driver and connects to an external database, multiple retrieval and modify operations can be performed on the database. Query execution can also be automated by using incoming "trigger" data items arriving from the InfoBus. Queries can be parameterized by additional items read from the InfoBus.

One instance of the JdbcSource applet represents one database. To access more than one database, additional instances of the JdbcSource applet are needed.

JdbcSource uses the Java Data Base Connectivity (JDBC) framework to connect to external data sources. JdbcSource is intended mainly for use as an "invisible" component but can also display a simple user interface to assist in debugging when developing applications.

JdbcSource Applet Flow of Operation

The general flow of operation while using the JdbcSource applet for data access functions goes as follows:

Using the JdbcSource applet in an HTML Page

The following code example demonstrates how an instance of the JdbcSource applet is inserted in an HTML page. The APPLET tag is immediately followed by PARAM (parameter) tags that provide the configuration and database connection information for the applet.

<APPLET NAME="shoeQuery" CODEBASE="..\..\.." CODE="lotus.jdbc.JdbcSource" WIDTH=1 HEIGHT=1>
  <PARAM NAME="database" VALUE="jdbc:dbaw://joxer:8889/ODBC_DSN/PQueryData/PQueryData">
  <PARAM NAME="user" VALUE="dba">	
  <PARAM NAME="password" VALUE="sql">
  <PARAM NAME="allowUI" VALUE="false">
  <PARAM NAME="autoConnect" VALUE="true">
  <PARAM NAME="retrievals" VALUE="shoeQueryResult">
  <PARAM NAME="shoeQueryResult" VALUE="select Price,Quantity,Description from SalesData where State='%state%'">
  <PARAM NAME="shoeQueryResult_resultStyle" VALUE="Data">
</APPLET>

Refer to the individual PARAM tag topics for more information on the specific function of each tag.

JdbcSource Applet Parameter Tags

The following parameter (PARAM) tags are used for configuring and programming the JdbcSource applet via HTML:

allowUI PARAM tag
autoconnect PARAM tag
autoexecute PARAM tag
autoload PARAM tag
commands PARAM tag
database PARAM tag
dataItemName PARAM tag
debug PARAM tag
driver PARAM tag
host PARAM tag
name PARAM tag
password PARAM tag
query PARAM tag
resultStyle PARAM tag
retrievals PARAM tag
user PARAM tag

JdbcSource Applet Properties

The following applet properties are available for programming the JdbcSource applet via JavaScript:

allowUI property
autoconnect property
user property
password property
database property
enableDebug property
host property
queries property