database PARAM tag



Selects the database to connect to and query upon startup. Also identifies the JDBC driver being used in the operation.

Syntax

<PARAM NAME = "database" VALUE = "dbIdentifier">

Values

dbIdentifier

Provides a URL-like specification designating the database that the application is to connect to as well as the JDBC driver that is to be used.

This value has the following format: jdbc: driverID: driver-arguments. An example of the dbIdentifier is shown in this code example:

<PARAM NAME="database" VALUE="jdbc:dbaw://joxer:8889/ODBC_DSN/PQueryData/PQueryData">

The following table describes each part of dbIdentifier.


Value Description
jdbc This part of the dbIdentifier is parallel to protocols currently defined for URLs, such as "http:" and "file:". It identifies that JDBC is the Java interface that allows you to connect to an external database.
driverID This identifies the JDBC driver being used. For the JDBC to ODBC bridge driver, the value is "odbc:". For Symantec's dbANYWHERE the value is "dbaw:".
driver-arguments This value depends on what is used for the driverID.

If "odbc" is used then the value must be an ODBC Data Source Name registered on the current machine. All necessary ODBC infrastructure and drivers must also be installed.

If "dbaw" is used then values of the arguments are in the format of HTTPserver:port:SQL_Server/dbServer/db where:

  • HTTPserver is the is the HTTP server from which the HTML page, the JdbcSource applet classes, and the dbANYWHERE JDBC driver classes are downloaded.
  • port is the port on the server at which dbaw.exe (the dbANYWHERE middleware process) is listening. It is possible to change this, but the change must be made both in the configuration of dbaw.exe and in any HTML pages that refer to it.
  • SQL_Server is instruction for dbaw.exe to use Sybase SQL Server's interface (called dblib).
  • dbServer is the name of the database server machine (This can be separate from the Web server machine).
  • db is the database on the designated SQL Server machine.

Usage

The database identifier format depends on the JDBC driver being used. The data type is String.

Example
database PARAM tag example

See also
JdbcSource applet
Connecting to a database