mobile databases, mobile forms, and mobile synchronization … where you need to work
Providing Pocket Access, Mobile Database, Windows CE Database, and Windows CE Development Solutions

Tip of the Month (October 2007)

Creating Visual CE Forms to Run on Desktop Computers Using Local or Remote Data

Visual CE is primarily a tool to build applications that run on a handheld. But, if the Visual CE runtime system is installed on a desktop computer, a Visual CE form can also run on the desktop.

 

Visual CE forms that run on the desktop using data on the desktop

Forms created to run on a handheld using data in the Windows CE Store (i.e. tables created using Visual CE's FILE | CREATE TABLE or FILE | DOWNLOAD TABLE) can run on the desktop without any modification. The Visual CE runtime system looks to the synchronization settings (FILE | SYNCHRONIZE) to determine where the data is stored on the desktop.

Say you have a form (MyForm.vce) built over a table (MyTable). Say that Visual CE's synchronization settings specify that MyTable is to be synchronized to MyTable in MyDatabase.mdb on the desktop. If, in File Explorer on the desktop, you navigate to the form and double click it, the form will run and show data from MyTable in MyDatabase.mdb.

 

Visual CE forms that run on the desktop using data on a server

Alternatively, You can use mEnable and run a form on the desktop against data on a server. It's a little tricky, but it can be done. Here's how...

Note: You will need to get an mEnable license for each desktop client machine.

To build a form that runs on the desktop usingdata on a server:

  1. Install the mEnable server software on the mEnable server machine.
  2. Install the mEnable desktop client software on the desktop client machine (i.e., the machine you want to run the applicaiton on).
  3. On the mEnable server machine, select START | SETTINGS and open up the ODBC Data Sources (it might be under "Administrative Tools").
  4. Click the "File DSN" tab.
  5. Click "Add".
  6. Select the driver for your database (Access, SQL Server, etc. but NOT mEnable) and click NEXT.
  7. Specify a name for the DSN (for example, MyDSN). Click NEXT. Click FINISH.
  8. You will see a configuration dialog for the driver. Fill in everything needed to make the connection except the user name and password. For example, if you were using the SQL Server driver, you would specify the name of the machine running SQL Server.
  9. Click OK to close the datasource configuration dialog.
  10. Click OK to close the ODBC administrator.
  11. Run the Visual CE development software on the mEnable server machine.
  12. Select FILE | NEW FORM. Select "Server Database'. Click YES to the warning.
  13. Pick the data source you selected in step (7) and click OK. Enter the username and password (if need be) and click OK.
  14. Pick your table and click OK.
  15. Build your form as you normally would (without an mEnable stoplight control).
  16. OPTIONAL: Select FORM | PASSWORD and set the Host to the mEnable server machine.
  17. Save your form to the desktop (FILE | SAVE AS).
  18. Copy the form and the .DSN (they are both in the folder you specified in step (17) to your desktop client machine.

To use this form on your desktop client machine, use File Explorer to navigate to the form you copied in step (18) and double click the form.