Exporting and Importing a Database

ActiveSync 3.0 uses file filters to automatically handle conversions between desktop computer file formats and Windows CE–based device file formats. ADOCE provides the file filter Adofiltr.dll to handle the conversion from Microsoft Access file format to ADOCE file format. The file format on Windows CE–based devices is listed as .cdb, but the .mdb tables are stored as database tables in the Databases directory of the device. This topic covers the following procedures:

To import a desktop computer database to a Windows CE–based device

  1. Connect the Windows CE–based device to the desktop computer.

  2. Open ActiveSync 3.0, and choose Import Database Tables from the Tools menu.

  3. Type the database path and filename in the Open dialog box, and choose OK.

  4. Choose OK to copy the entire database to the Databases folder on the device. You can also expand the tables and choose individual fields.

To export an ADOCE database from a device to a desktop computer

  1. Choose Export Database Tables from the Tools menu in the Mobile Devices window.

  2. Type the database path and filename in the Location dialog box.

  3. Select Table1, and clear every other table in the Select the tables to copy box.

  4. Select the box labeled Overwrite existing tables and/or data, and choose OK. The converted table from the device replaces the table in the file.

  5. Open the database file in Microsoft Access to see the exported database.

When importing or exporting databases, you can specify an Open Database Connectivity (ODBC) data source instead of a Microsoft Access file. ADOCE supports Access and SQL Server ODBC sources.

Note   For a sample showing how to import and export databases, see EmulDB Sample Application.