Configuring JDBC Data Sources

CAUTION:
The concatenated length of all primary keys may not exceed 255 characters in length for JDBC data sources.

To configure a JDBC data source:

  1. In the menu, click Project:<Project Name> > Project Settings .
  2. Click the Data Sources tab. The Data Sources page displays, listing all of the data sources that have been created for the system.
  3. Click New Data Source to open the New Data Source dialog box.
  4. Type a Name for the data source.
  5. From the Data source type list box, select JDBC.
    Note: If you are setting up an ODBC data source, you need to manually insert your ODBC Driver class and URL. For example, Driver class: sun.jdbc.odbc.JdbcOdbcDriver, URL: jdbc:odbc:MyDatabaseName. You must also set up an ODBC data source in MS Windows in the Administrative Tools. For more information, refer to Microsoft Windows Help. If you have your front-end server and your application server on different machines, make sure that the name of your system data source set-up in Microsoft Windows is the same as the ODBC data source. These names are case-sensitive.
  6. If you select JDBC as the Data source type, the Driver class field is populated automatically. In the URL field, replace the host name value, <hostname>, with the name of the computer that is hosting the data source and replace the database name value, <databasename>, with the name of the target database.
  7. In the Username and Password fields, enter valid database credentials.
  8. Optional: If you are working with a database that includes multiple tables, and you want to narrow down the data source to specific tables, you can browse to and select specific tables for inclusion:
    1. Click [...] next to the Table filter field.
    2. The Select Table Filter dialog box displays. Select the tables that you want included as your data source.
    3. Click OK.
  9. Optional: Key column selection is used by tests to define which worksheet columns within a data source are used as primary key. This is helpful if your data source will undergo edits, for example when you add or remove rows within a worksheet. Even if your data source is edited, tests will still be able to identify which columns or rows should be used. Tests created from data-driven data sources use key column values in their names, rather than column numbers.
    To configure a key column:
    1. Click [...] next to the Key column field.
    2. The Select Key Column dialog box displays. Select a column from the column list that is to act as a key column.
    3. Click OK.
  10. Click OK on the New Data Source dialog box.