A connection alias specifies the characteristics of a database connection for a Select bean. Select Add in the Connection page of the Query property editor to define a new connection alias. Select a connection alias from the Connections list in the Connection page of the Query property editor and select Edit to edit the selected connection alias. Selecting Add or Edit opens the Connection Alias Definition window.
The value of subname depends on the subprotocol specification; the subname value provides information to locate the database. For example, a full URL specification for an application accessing a local database named sample through the DB2 application JDBC driver is:
jdbc:db2:sample
Here, sample is the subprotocol value.
By comparison, a full URL specification for an applet using the Sybase jConnect driver to access a database named sample, on a remote server named myserv, through port number 88 on the internet is:
jdbc:sybase:Tds:myserver:88/sample
Here, the subprotocol value includes the database server name, port number, and database name.
The Workspace needs to have access to the JDBC driver class that you select. To ensure access, you need to add the directory or Jar/Zip file, as appropriate for the JDBC driver class, to the workspace classpath.
In the following example, three properties are passed:
proxy=myserver:88;a=1;b=2
Select Test Connection to test the database connection using the specifications made in the connection alias definition.
When you finish defining or editing a connection alias, select OK. Selecting OK to define a new connection alias, creates a new method for the connection alias in the database access class and adds the connection alias to the Connections list in the Connection page of the Query property editor.
To cancel defining or editing a connection alias, select Cancel.