Importing a Table

In addition to importing entire databases, with the ADOCE control you can copy selected tables from Microsoft Access .mdb files to a Windows CE–based device. Using the Import from Database to Mobile Device dialog box, you can select which tables and fields to convert to ADOCE databases.

To import a Microsoft Access table and field to a device

  1. Connect the device to the desktop computer and open ActiveSync 3.0.

  2. Choose Import Database Tables on the Tools menu in the ActiveSync 3.0 window.

    An Open dialog box appears.

  3. Select the Microsoft Access .mdb file containing the table you want to import.

    The Import from Database to Mobile Device dialog box appears. The dialog box lists the tables and fields in the database.

  4. Select the check box for the table and field you want to import, and clear the check boxes for the tables and fields you do not want to import.

  5. Select the check box for the Read-Only field for tables you want to make read-only.

  6. Select the Overwrite existing tables and/or data check box if you want to replace tables on the device that have the same name as the tables in the .mdb file.

  7. Choose OK to begin the conversion.

You can also initiate the conversion by dragging the .mdb file to the device icon in the ActiveSync Mobile Devices window. This replaces steps 2 and 3 in the procedure. The following screen shot shows the Import from Database to Mobile Device dialog box.

The Import from Database to Mobile Device dialog box includes the following features:

For each .mdb file that is imported, the converter generates a log file named Db2ce.txt in the partner directory for the device, usually in C:\Program Files\Windows CE Services\Profiles\devicename.

You may also choose to import tables from an ODBC data source.

To import data from an ODBC data source into a device

  1. Connect the device to the desktop computer and open the Mobile Devices window.

  2. Choose Import Database Tables on the Tools menu in the Mobile Devices window.

    An Open dialog box appears.

  3. Choose ODBC Database in the Files of Type list box.

  4. Choose an ODBC data source.

    The Import from Database to Mobile Device dialog box appears. The dialog box lists the tables and fields in the database.

  5. Select the check box for the table and field you want to import, and clear the check boxes for the tables and fields you do not want to import.

  6. Select the check box for the Read-Only field for tables you want to make read-only.

  7. Select the Overwrite existing tables and/or data check box if you want to replace tables on the device that have the same name as the tables in the database file.

  8. Choose OK to begin the conversion.