Calling Data

Both "Connect" tags and URL requests can be used to retrieve data from external databases. The syntax used to call the data is as follows:

MOD=TEMPLATE SRV="Data Provider" Parameter=

MOD=TEMPLATE When calling data from external databases, the Module always equals "Template".
SRV="Data Provider" There are two Data Providers:

SRV=SQL

This is used to call data from SQL databases.

SRV=LDAP

This is used to call data from LDAP databases
See Data Providers for further information.
Parameter= There are various parameters used when calling data, and when formatting data. See Data Providers and Formatting Data for further information.

 

Calling data using Connect Tags

<CONNECT MOD="TEMPLATE" SRV="SQL"  DB="jdbc:odbc:accesssample"  SQL="Select
* from employee"> Failure text </CONNECT>

In this example:

  • The Module equals Template
  • The Service equals the SQL Data Provider
  • The Parameters include:

    DB=

    This is used to define the database that the data is being called from.

    SQL=

    This is used to define the SQL query used to select a data set from the SQL database.
    .

 

Calling data via a URL request

<A HREF="?MOD=TEMPLATE&SRV=SQL&TEMPLATE=sqldb2j.html"></A>

In this example:

  • The Module equals Template
  • The Service equals the SQL Data Provider
  • The Parameter is the Template parameter, which is used to define which formatting template will be used to format a Result Set.

Parent topic: Displaying Data from Databases.


IBM Workplace Web Content Management - V5.1.0.1 -

 

Workplace Web Content Management is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.