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.
About 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.
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.
Expand the ODB ODBC node, then expand the Utilities node.
Double-click on the ODBC Administrator item.
The ODBC Administrator opens.
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.
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.
On the Database tab, click the Browse button.
Browse to the ASADemo_10.db
file
in the PocketBuilder Code Examples\SADemoData\SA10
directory.
Type ASADemo
for
the Database Name, ASADemo
for
the Server Name, dbeng10 -c 8M
for
the Start Line.
Select the ODBC tab and click the Test Connection button.
You should receive a success message.
Click OK twice to close the message box, save the DemoDB_SA10 ODBC profile, and return to the Database Profile painter.