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:
- Download the
Free Visual CE Add-on Tools and install them.
- If the data in the table on the handheld is important to you (i.e., if
you don't want to loose it):
- On the desktop, run the Visual CE tools
(START | PROGRAMS | VISUAL CE | VISUAL CE TOOLS)
- Click BACKUP
- 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.
- Click OK
- Click OK when you see the "Finished Backup" dialog box
- Click Quit to close the Visual CE Tools
- On the desktop, open Visual CE (START | PROGRAMS | VISUAL CE | VISUAL CE)
- Select FILE | DELETE TABLE. Select MyTable and click OK. Click Yes when
asked if it is OK to delete the table.
- 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).
- 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
- Close Visual CE.
- The DELETE TABLE (step 3) removed the data from the table. To restore
the data, use the backup you created in step 1:
- On the desktop, run the Visual CE tools again
(START | PROGRAMS | VISUAL CE | VISUAL CE TOOLS)
- Click BACKUP
- Click the Load radio button. Specify c:\Backup.ced as the backup
file name. Leave the Append checkbox unchecked.
- Click OK
- Click OK when you see the "Finished Reload" dialog box
- 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