Establishing the Connection to the External Database

When you have specified the name to be associated with your external database schema, the Data Source sheet of the External Schema Wizard, shown in the following image, then enables you to specify the information required to establish the connection to the external database using ODBC.

Your data source connection can be a machine or a file data source.

To specify your data source

  1. Check the Proceed Offline check box if you want to use the External Schema Wizard without connecting to the data source every time. This check box is enabled only after a successful connection to a data source has been established at least once, and the necessary catalog information has been read. If the External Schema Wizard is used offline, it cannot detect any changes that have occurred in the catalog information of the data source since the last connection was established.

    By default, this check box is unchecked; that is, the External Schema Wizard attempts to connect to the data source every time that it is used.

  2. The Machine Data Source option button is selected by default if it is a new data source. If a data source has been specified previously, the last data source that was used is displayed. Select the required data source from the drop-down list box if you want to connect to a machine data source.

    Alternatively, select the File Data Source option button and specify the data source name in the corresponding text box if you want to specify a file data source.

  3. If you know the name of your data source, click the Connection String option button and then specify the source in the Connection String text box; for example:

    DSN=TestDataSource;AutoStop=yes

    For security reasons, your user code and password are not displayed.

  4. If you do not know the data source, click the Browse button.

    The ODBC Driver Managers Data Source Browser is then displayed, to enable you to select an existing data source from the Machine sheet or the File sheet of the ODBC Driver Managers dialog. When you have selected the required data source and clicked the OK button, the selected data source is then displayed in the Connection String text box (without the user code and password).

    If you later change the data source to access a database with a different schema, this marks all existing class definitions as obsolete and causes their deletion.

  5. Check the Save Default Authentication check box if you want to store the authentication part of the connection string; that is, the user code and password. When this check box is unchecked (the default), no administrative-level password is stored in an unsecured system and any existing authentication that is stored is deleted. If no authentication is stored, the ODBC driver prompts you for it.

  6. Click the Next > button when you have specified your data source. Alternatively, click the Close button to close the wizard.

When you click the Next > button, the External Schema Wizard then enables you to select the tables for exclusion from your external database schema.

For details about the JADE methods that enable you to set or return the external database machine or file data source, see the ExternalDatabase Methods, in Chapter 1 of the JADE Encyclopaedia of Classes.