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 2010)

Dealing with the "The structure of the form's underlying table has changed" message

On occasion, you will see the error message: "The structure of the form's underlying table has changed. OK to modify the form (may cause controls to be deleted from your form)?". Here's why this message comes up and what you can do about it.

Visual CE saves the table definitions (table name, number of columns, column names, column types) in two different places:

  • in a file in the windows folder on the desktop called WCEODBC.INI, and
  • in the .VCE file

When you open a .VCE in the form designer on the desktop, we see two definitions of the table: the one in the WCEODBC.INI file and the one that was saved in the .VCE file. We assume the definition in the WCEODBC.INI file is the "best" definition. The definition stored in the .VCE file is "second best". If the definitions are inconsistent, we have to reconcile them (which is when you see the "The structure of the underlying table has changed" error message).

How did these table definitions get inconsistent? Perhaps you did this:

  1. Downloaded a table to the handheld.
  2. Built a form over it.
  3. Modified the structure of the table on the desktop/server.
  4. Downloaded the table to the handheld again.
The form has the "old" table definition, the WCEODBC.INI file has the "new" table definition.

Another way the table definitions can become inconsistent is if you do the following:

  1. Connect the handheld to one desktop computer.
  2. Run Visual CE on that desktop computer and create a table on the handheld (using Visual CE's FILE | CREATE TABLE or FILE | DOWNLOAD TABLE).
  3. Disconnect the handheld from the first desktop computer and then connect it to some other desktop computer.
  4. Run Visual CE on that other desktop computer, select FILE | NEW FORM, and select the table you created in step (2).
In these cases, the definition is neither in a form (after all, there is no form yet), nor is it in the WCEODBC.INI file. Visual CE can see the table on the handheld, so it does its best to figure out the table definition. Usually it can figure out how many columns there are and the datatype of each column. But it can't figure out the names of the columns (which is why you sometimes see the columns named Column0, Column1, Column2, ...). This generated table definition gets put into the WCEODBC.INI file (and, if you later open an old form that uses this table, the column names won't match, so you get the "The structure of the form's underlying table has changed" message.

Because of all this, sometimes you get into the situation where you know that the definition of the table in the .VCE file is the correct one and you want to somehow use that definition to overwrite the one in the WCEODBC.INI file. As it turns out, SYWARE provides a tool to do exactly that.

In the Free Downloads section of our website (www.syware.com) there are some Visual CE Add-On tools. You can use one of these tools (the REBUILD tool) to replace the definition of a table in the WCEODBC.INI file with the definition of the table in the .VCE file.


Previous Tips of the Month