SQL Anywhere includes two database servers—a personal database server that can be used on a single desktop, and a network database server that supports communications across a network. The network database server, dbsrvXX.exe is always used on Windows CE systems, where XX is the version of the SQL Anywhere database system. (The personal database server uses the dbengXX.exe engine.)
Figure 14-1 show the basic software components required to connect to a SQL Anywhere data source in PocketBuilder.
Figure 14-1: Components of a SQL Anywhere connection
The PocketBuilder ODB interface (pkodb20.dll) calls ODBC functions to submit SQL statements, to catalog requests, and to retrieve results from a data source.
The Microsoft ODBC driver manager (odbc32.dll) installs, loads, and unloads drivers for an application.
No ODBC driver manager on Windows CE There is no ODBC driver manager on Windows CE. For more information, see “Connecting to a SQL Anywhere database on Windows CE”.
The SQL Anywhere ODBC driver (dbodbc9.dll or dbodbc10.dll) processes ODBC function calls, submits SQL requests to a particular data source, and returns results to an application. The driver also translates an application’s request so that it conforms to the SQL syntax supported by the SQL Anywhere database.
The SQL Anywhere data source stores and manages data for an application.
Before you define and connect to a SQL Anywhere data source in PocketBuilder, follow these steps to prepare the data source.
To prepare a SQL Anywhere data source:
Make sure the database file for the SQL Anywhere data source exists.
You can create a new database using SQL Anywhere outside of PocketBuilder, or by launching the Create ASA Database utility from the Utilities folder in the Database Profiles dialog box. For more information, see the chapter on managing databases in the User’s Guide.
You can also convert an enterprise database for use with PocketBuilder. For more information, see “Preparing remote databases”.
Make sure you have the log file associated with the SQL Anywhere database so that you can fully recover the database if it becomes corrupted.
If the log file for the SQL Anywhere database does not exist, the SQL Anywhere database engine creates it. However, if you are copying or moving a database from another computer or directory, you should copy or move the log file with it.