Developing an Application for Switchable Databases

Note: Before you start a Business Components project, you must chose which database scenario you will use. You cannot change the SQL dialect and type map once you start the project.

In this development scenario you can build and run business components against Oracle8i and one or more foreign databases by switching the connection.

To configure a business component project for switchable datasources:

  1. Begin a Business Components project.

  2. On the Connection page of the Business Component Project Wizard, click New to create a new connection.

  3. In the Connection dialog box's Select a JDBC Driver field, the appropriate connection type.

  4. Create your database connection.

  1. Click Test Connection for each connection. You should see the message "Success".

  2. Repeat steps 2-5 for each connection.

  3. Click OK.

  4. Start a Business Components project.

  5. In the Business Components Project Wizard's Connection page

    1. In the SQL Dialect field, select SQL92.

    2. In the Type Map field, select Oracle.

When you want to switch datasources you must switch the libraries and change the connection first. Additionally, you must observe certain limitations depending on your connection type.