Database Wizard – Data Source (JSP)

Develop > Database > Block Properties > Data Source tab

If you specified JSP as the script type in the first step of the Database Wizard, this dialog box is used to specify the data source URL and, optionally, a user-defined driver class. Namo WebEditor needs this information in order to set up the database-enabled document to connect to the database through JDBC (Java Database Connectivity).

Data source URL

Specifies the URL of the database. The form of the URL varies depending on the database type specified in the first step of the Database Wizard. If you specified any database type other than “User-defined”, this field is initially filled in with a generic URL appropriate for the database type. Select the parts of the URL within brackets and enter the correct values for your database. (Make sure to delete the brackets.)

If you specified “User-defined” as the database type in the first step of the Database Wizard, the Data source URL field will be initially blank. Enter the URL for your database.

Example:

If you are connecting to a Microsoft SQL Server database, the generic URL has this form:

jdbc:inetdae:[hostname]:[port]?database=[database]

To complete the URL for a database named “MyDB” residing on server “www.namo.com” through port 1444, edit the URL to read:

jdbc:inetdae:www.namo.com:1444?database=MyDB

Driver

If you specified any database type other than “User-defined” in the first step of the Database Wizard, this field displays the class name of the driver that will be used to connect to the data source. The class name cannot be edited.

If you specified “User-defined” as the database type, enter the class name of the driver to use to connect to the database.

You can search for JDBC drivers compatible with your database type by visiting Sun Microsystem’s JDBC driver search page at http://industry.java.sun.com/products/jdbc/drivers.

User ID

Enter the user ID you use to access the database.

Password

Enter the password you use to access the database.

You can complete the Database Wizard even without supplying a user ID and password to your data source. However, if you do not supply a user ID and password, you will not be able to preview your database-enabled document in Namo WebEditor’s Preview window.

ODBC DSN for preview

Even if you use JDBC to connect to your database, you must also specify an ODBC DSN (Data Source Name) to the same database. This is because Namo WebEditor always uses ODBC internally to discover the names and types of the fields in the database, for use in later steps of the Database Wizard as well as database-related dialog boxes.

If you have already set up an ODBC DSN for your database, select it from the drop-down menu. Otherwise, select <Make New DSN> and follow the steps in the Create New Data Source dialog box to set up a new ODBC DSN.

Once you complete the Database Wizard, the ODBC DSN for preview cannot be changed.

Database Wizard – Data Source (JSP)