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

Restoring column names

Sometimes, you may be working in the Visual CE form designer on the desktop and you discover that you have "lost" your column names. In particular, the column names have been changed to Column0, Column1, Column2, etc. Usually this happens because you reinstalled Visual CE and you wiped out the table definitions that were stored on the desktop.

If you happen to have a form built over that table (see the note below), you can restore the column names. We'll call the form MyForm.vce and the table MyTable. Here's what to do:

  1. Download the Free Visual CE Add-on Tools and install them.
  2. If the data in the table on the handheld is important to you (i.e., if you don't want to loose it):
    1. On the desktop, run the Visual CE tools (START | PROGRAMS | VISUAL CE | VISUAL CE TOOLS)
    2. Click BACKUP
    3. Make sure the Backup radio button is selected. Select MyTable from the list of tables. Specify c:\Backup.ced as the backup file name. Leave the Delete Table checkbox unchecked.
    4. Click OK
    5. Click OK when you see the "Finished Backup" dialog box
    6. Click Quit to close the Visual CE Tools
  3. On the desktop, open Visual CE (START | PROGRAMS | VISUAL CE | VISUAL CE)
  4. Select FILE | DELETE TABLE. Select MyTable and click OK. Click Yes when asked if it is OK to delete the table.
  5. Select FILE | OPEN and open up MyForm.vce. The definition of MyTable is stored in the .VCE file and Visual CE will use that to restore the table definition (including the column names).
  6. Select FILE | MODIFY TABLE, click YES to the warning and you should see a description of the table with the original column names. Click CANCEL
  7. Close Visual CE.
  8. The DELETE TABLE (step 3) removed the data from the table. To restore the data, use the backup you created in step 1:
    1. On the desktop, run the Visual CE tools again (START | PROGRAMS | VISUAL CE | VISUAL CE TOOLS)
    2. Click BACKUP
    3. Click the Load radio button. Specify c:\Backup.ced as the backup file name. Leave the Append checkbox unchecked.
    4. Click OK
    5. Click OK when you see the "Finished Reload" dialog box
    6. Click Quit to close the Visual CE Tools

Note: If you don't have a copy of MyForm.vce on the desktop, but you have one on the handheld, simply use ActiveSync or Windows Mobile Device Center to copy that .VCE file from the handheld to the desktop.


Previous Tips of the Month