About SQL Anywhere data sources

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.)

Basic software components for SQL Anywhere

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 figure illustrates the components of an Sequel Anywhere connection. At top is the PocketBuilder development environment and the O D B C  interface called P K O D B n n dot D L L, where n n is the major PocketBuilder version number. These application elements are connected by two-way arrows to each other and to the next component, the O D B C Driver Manager called O D B C 32 dot D L L. The Driver Manager connects by another two-way arrow to the O D B C driver named D B O D B C dot X X D LL, where X X is the. database system version number. The driver, in turn, is  connected by a two-way arrow to the Sequel Anywhere data source.

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.

NoteNo 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.

Preparing to use the data source

Before you define and connect to a SQL Anywhere data source in PocketBuilder, follow these steps to prepare the data source.

StepsTo prepare a SQL Anywhere data source:

  1. 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”.

  2. 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.