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

Visual CE® FAQ

Visual CE software allows you to build custom mobile database applications for any Windows Mobile, Pocket PC, Smartphone, or Windows CE device

V3-a) I just downloaded data from Access, but I can't find it on the Windows CE device. Where is it?

Visual CE makes a distinction between a "table" and "form". A table is a cloud of information. Only a computer can read a table. A form is a program that can read data from a table and put it on the screen, and vica-versa.

When you exported the table from Access, you created a table, not a form. You need to create a form that uses that table in order to see the data. Start Visual CE on the desktop, and say FILE | NEW FORM to create the form. You will be asked which table you want to use. Select your table and create your form.

After you create your form, download the form to the handheld and run it there. You will see the data.

V3-b) How can I move data from my old HP 100LX or HP 200LX into Visual CE?

Our web site contains two free utilities to do this. You need them both:

Move GDBDUMP.EXE to your HP 100LX or HP 200LX, and run it there. To run it, type the following at the DOS prompt (assuming the database is in \DATABASE\MYDATA.GDB):

CD \DATABASE
GDBDUMP MYDATA.GDB > MYDATA.CDF

Then move MYDATA.CDF to your desktop. Connect your handheld to your desktop, and run HPIMPORT.EXE on your desktop machine. This will write the data onto your handheld.

This will move the data, but not the form. You will have to use Visual CE on the desktop to create a new form to display the data.

V3-c) Can Visual CE synchronize with a Microsoft Access database? What other types of databases can Visual CE synchronize to?

Visual CE can synchronize with a Microsoft Access database or any other database that can be read and written via ODBC (Level 2 API).

You must have an ODBC driver for the database installed on your desktop system. To check, select START | SETTINGS | CONTROL PANEL | ODBC 32 and select the "Drivers" tab. You must have a data source set up on the driver. To set up a data source, click the "User" or "Machine" tab and click the ADD button.

V3-d) I downloaded a table and now I get the error, "Tables not compatible for synchronization" when I try to synchronize. Why?

When synchronizing a table on the desktop to a table on the Windows CE device, Visual CE checks to make sure the two are compatible. It performs these tests:

  • The name of the table on the desktop must exactly match the name of table on the Windows CE device.
  • The table on the desktop must have one extra column. It must be the first column of the table. It must be called OID. It must be a numeric column.
  • Except for the "extra" OID column on the desktop, the names of the columns and their datatypes must be the same.

If you export a table from Microsoft Access (using FILE | SAVE AS), you will not be able to synchronize it until you add the OID column into the Access table. See the help topics "Synchronizing Tables" and "Downloading a Table from an ODBC-enabled Application on the Desktop PC" in the Visual CE on-line help file for more details.

V3-e) When I synchronize I want to move the records from the Windows CE device to the desktop and then remove them from the handheld. How do I do this?

Starting in Visual CE 8.0, there is a synchronization operator ( <--x ) that does exactly this.

If you have on older version of Visual CE, do the following:

  1. Build a table on the handheld

           FOO
           ---

      Name  Age
      ----  ---
      Fred   32
      Sam    44


  2. Build a form on that table (call it FOO_FORM.VCE)
  3. Synchronize the FOO table on your handheld with a desktop database. Set synchronization to be two way (choose the "<-->" radio button). This will create a FOO table on the desktop:

              FOO
              ---

      OID   Name  Age
      ---   ----  ---
            Fred   32
            Sam    44


  4. If you want to use FOO_FORM.VCE to create records on the handheld and periodically move the records to the desktop and then delete them from the handheld...
     
    Rename FOO to be FOO_ARCHIVE

          FOO_ARCHIVE
          -----------

      OID    Name   Age
      ---    ----   ---
             Fred    32
             Sam     44


  5. In the desktop database, create a view (a.k.a. "query") called FOO built on top of FOO_ARCHIVE. The FOO view (query) would have three fields:

    1. OID - derived from OID
    2. Name - derived from Name
    3. Age - derived from Age

      Use the criteria "=0" on OID

  6. The FOO view (query) will have no records in it. The next time you synchronize, the records will be removed from the handheld (since the handheld will see no records in FOO in the desktop database, it will think the records were deleted and the deletion will be propagated to the handheld).
  7. Use FOO_FORM on the handheld to create a record on the handheld. Synchronize once and this record will be written to FOO on the desktop (which, in turn, will write the record to FOO_ARCHIVE). Since the OID of the record will not be 0, the record will not be visible in the FOO view (query). Consequently, if you synchronize a second time, the record will be deleted from the handheld, as described above.

V3-f) When I synchronize, Microsoft Access gives me the message, "Field can't be a zero-length string". How do I fix this?

On your desktop system, bring up Access and load in the database you are synchronizing to. Click on the 'Tables' tab and then click once on entry for the table you are synchronizing to. Then press the 'Design' button. In the 'Field Name' column, click on the name of the field. Change 'Allow Zero Length' (on the bottom of the window) from 'No' to 'Yes'.

V3-g) Do I have to do anything special to synchronize with SQL Server?

As long as you have a SQL Server ODBC data source, you can synchronize with SQL Server. However, before you synchronize, you will need to create a primary key over the tables you are trying to synchronize to.


V3-h) When I set the "Synchronize on connect" box, I get these annoying messages "Starting Synchronization" and "Synchronization Complete". Is there any way to turn this off?

On the desktop, use an editor like notepad to modify the WCEODBC.INI file in the windows directory. Change:

[VICESYNC]

to:

[VICESYNC]
Quiet=1


V3-i) When I try to synchronize, I get a message that says, "Field cannot be updated" or "You tried to assign the Null value to a variable that isn't a VARIANT datatype". What is this and how can I fix the problem?

This message is generated from the Microsoft Access ODBC driver. It occurs when a column on the desktop is an autonumber column and you changed the value of this column in a record on the handheld. If you make the column in the desktop table a regular number column, the problem will be resolved.


V3-j) When I try to synchronize with Access, I get the message "[Microsoft][ODBC Microsoft Access Driver]Datetime field overflow (null)". What is this and how can I fix the problem?

This is the result of a bug in the Access 2000 ODBC driver. You can get a fix for this problem from http://www.syware.com/download/wce/qfe204.zip. (NOTE: when replacing a DLL on newer Windows machines, you must do this while in "safe mode").

There is an alternative solution to this problem. See the February 2008 "tip of the month".


V3-k) Is there anything I can do to make synchronization faster?

There are few things you can do to make synchronization faster:

  • If you are using a dialup connection, increase the baud rate of your connection
  • Store the data in a Pocket Access database (a .CDB file) or SQL Server CE database (a .SDF file) rather than a table created by Visual CE and use the Microsoft synchronizer (Microsoft's synchronizer is faster than ours since they control the database on both sides and the connection in between).
  • Use Timestamp Synchronization. To do this, add a column at the end of your desktop table called TIMESTAMP whose datatype is Date/Time. Synchronization will be significantly faster, but at a price: every time you insert or modify a record, you must set this timestamp.

V3-l) When I use FILE | DOWNLOAD to download data from an Excel speadsheet, why is the list of tables empty?

You need to define the table in the spreadsheet. To do this, open the spreadsheet in Excel and do the following:

  1. Select the region containing the data
  2. Select INSERT | NAME | DEFINE from from the menu bar.

For more details, consult your Microsoft Excel documentation.

V3-m) When I use Pocket Access databases (*.cdb files) and Microsoft's Active Sync's database synchronization, why aren't the changes on the handheld being sent to the desktop database?

Make sure you close the form (RECORD | CLOSE) before you synchronize.

V3-n) If I create a table on the handheld, why doesn't it show up in the list of FILE | SYNCHRONIZE tables on the desktop?

The table needs to be registered with the desktop. To do this, use ActiveSync to move a form based on that table to the desktop. Then, in the development environment on the desktop, select FILE | OPEN and load in the form. This will register the table with the desktop.

V3-o) I get the error "You do not have the necessary permissions to use the <<.mdb file>> object. Have your system administrator or the person who created this object establish the appropriate permissions for you." when I try to synchronize to an Access database (.MDB file). Why?

You are getting this error because the Access ODBC driver does not know where to find the database's .MDW file. Do the following:

(1) On your desktop, select START | SETTINGS | CONTROL PANEL | ODBC DATA SOURCES (this may be under ADMINISTRATIVE TOOLS).

(2) Select the "User DSN" or "Machine" tab.

(3) Click the 'Add" button.

(4) Specify a "Data Source Name" (for example, "My Access Datasource")

(5) Select the Microsoft Access Driver and press the "Finish" button.

(6) In the "System Database" section, select the "Database" radio button and click the "System Database..." button

(7) Select your .MDW table and click "OK"

(8) Click "OK" to create the ODBC Datasource and close the ODBC Administrator

(9) Connect your handheld to your desktop and open Visual CE on the desktop

(10) Select FILE | SYNCHRONIZE

(11) Specify the name you selected in step (4) as the "Desktop Datasource"

(12) Press the "Close" button.

You should now be able to synchronize your tables.

V3-p) When using Excel files, why do I see the error "[Microsoft][ODBC Excel Driver]Operation must use an updateable query."?

Your Excel ODBC Data source is set up as "Read Only". Open the definition of the Data Source (using "Data Sources (ODBC)" on the control panel's administrative tools), click the "Options" button, and turn off the "Read Only" flag.