Create a database profile for the tutorial database

Note

Now that you have defined ASADemo_10.db as an ODBC data source, you can create a profile for this data source in PocketBuilder.

If you closed the Database Profiles dialog box after the last exercise, open it again by clicking the Database Profiles button in the PocketBuilder toolbar.

  1. Select ODB ODBC in the Database Profile painter.

    Click the New button.

    The Database Profile Setup dialog box displays.

    Shown is the Database Profile Setup dialog box of the Database Profile painter. The Connection tab has fields for the profile name, data source, user I D and password.
  2. Type or select the required profile information.

    Profile setup

    Value

    Profile Name

    SA Demo

    Data Source

    DemoDB_SA10

    User ID

    DBA

    Password

    sql

  3. Select the Preview tab.

    The PowerScript connection syntax for the new profile is shown on the Preview tab. If you change the profile connection options, the syntax changes accordingly.

    Shown is the Preview tab of the Database Profile Setup dialog box. It displays the Database Connection Syntax in a scrollable area. Below this are buttons for Copy and Test Connection.
  4. Click the Test Connection button.

    A message box tells you that the connection is successful.

  5. Click OK to close the message box.

    Click OK to close the Database Profile Setup dialog box.

    You return to the Database Profiles painter.

  6. Select SA Demo and click the Connect button.

    Shown is the tree view of the Database Profiles painter with the S A Demo profile highlighted under the entry O D B O D B C

    PocketBuilder connects to the database and the Database Profile painter closes.

    What happens when you connect When you connect to a database in the development environment, PocketBuilder writes the connection parameters to the Windows registry. Each time you connect to a different database, PocketBuilder overwrites the existing parameters in the registry with those for the new database connection. When you open a PocketBuilder painter that accesses a database, you automatically connect to the last database used. PocketBuilder determines which database this is by reading the registry.