Define the tutorial data source

Note

In this exercise you create an ODBC data source for the ASADemo_10.db database that installs with PocketBuilder in the Code Examples\SADemoData\SA10 subdirectory. This is a version of the asademo.db Adaptive Server Anywhere 9 demonstration database that has been updated for SQL Anywhere 10.

NoteAbout the SQL Anywhere demonstration database The SQL Anywhere 10 demonstration database, demo.db, is significantly altered from the asademo.db database. When you install SQL Anywhere 10, an ODBC data source is automatically created for the demo.db database, but this data source is not used in the current tutorial.

  1. Click the Database Profile button in the PowerBar

    or

    Select Tools>Database Profile from the menu bar.

    PocketBuilder displays the Database Profiles dialog box, which includes a tree view of the installed database interfaces and defined database profiles for each interface. You can click the + signs or double-click the icons next to items in the tree view to expand or contract tree view nodes.

    Shown is the tree view of the Database Profiles painter with the ODBC Administrator highlighted under the utilities folder for the entry O D B O D B C
  2. Expand the ODB ODBC node, then expand the Utilities node.

    Double-click on the ODBC Administrator item.

    The ODBC Administrator opens.

  3. Select the System DSN tab and click the Add button.

    Select SQL Anywhere 10 from the Create New Data Source dialog box and click Finish.

    The ODBC Configuration for SQL Anywhere 10 dialog box displays.

    Shown is the O D B C tab of the dialog box for configuring an O D B C profile for S Q L Anywhere.
  4. In the Data Source Name text box on the ODBC tab, type DemoDB_SA10.

    On the Login tab, type DBA in the User ID text box and sql in the Password text box.

    The “Supply user ID and password” radio button must be selected before you can enter a user ID or password.

  5. On the Database tab, click the Browse button.

    Browse to the ASADemo_10.db file in the PocketBuilder Code Examples\SADemoData\SA10 directory.

  6. Type ASADemo for the Database Name, ASADemo for the Server Name, dbeng10 -c 8M for the Start Line.

  7. Select the ODBC tab and click the Test Connection button.

    You should receive a success message.

  8. Click OK twice to close the message box, save the DemoDB_SA10 ODBC profile, and return to the Database Profile painter.