EmulDB Sample Application

This sample application converts a desktop database in .mdb format to .cdb format and installs the .cdb file in the object store of the desktop emulator. The sample consists of a desktop application and a Windows® CE application. The desktop application opens an .mdb file and converts the contents of the .mdb file to a text file. After the conversion is done, the application uses the empfile.exe utility that comes with the platform Software Development Kit (SDK) to register the text file in the object store of the emulator. The Windows CE application in the emulator opens the .tdb file and converts the text into the Windows CE format using the ADOCE control. The data is stored in a .cdb file. Once the conversion is complete, you can manipulate the data in the .cdb file with any application that uses the ADOCE control.

To Run the Desktop application

  1. Load the file vbEmulDB.vbp into Visual Basic 6.0

  2. Run the project.

  3. Click the 'Select DB...' button to select a Database to convert.

  4. Once you have selected the Database click the 'Convert DB' button. This will create a file in the same directory as your database called <DATABASENAME>.tdb

  5. Click the 'Copy to Emulator' button to copy the .tdb file to the emulator's object store.

To Run the Windows CE Application

  1. Load the file EmulMB.vbp into Visual Basic 6.0.

  2. Run the project in the Emulator.

  3. Type the path to the .tdb file created by the desktop application.

  4. Click 'Create Tables'

Any errors that occur during the conversion will appear in the Text box on the form.

Additional Notes

In order to run this application, you must have the following items installed:

If the .tdb file does not appear in the emulator's object store after you have run the desktop application, move empfile.exe into the folder the desktop application is run from.

For more detail, see the comments in the source code.

This sample was written in Visual Basic 5.0 and will run in Visual Basic 6.0 without modification.