Tip of the Month (March 2007)
Downloading (Publishing) a Table With a Large Number of Records
On occasion, you may need to download a table with a large number of
records to the handheld. For example, you may have a PARTS table
with 10,000 parts in it. You can use "regular" Visual CE synchronization
(using the <--> or --> synchronization operator) to move these records
to the handheld, but it may take a bit of time.
Much of this time is used to establish the relationship between the record
on the handheld and the record on the desktop. You can save a significant
amount of time if don't need this relationship. You don't need this
- The handheld is never used to create new records in the table (or, if
a record is created, it is never sent up to the desktop), and
- The handheld is never used to modify a record in the table (or, if
a record is modified, the change is never sent up to the desktop), and
- The handheld is never used to delete a record in the table (or, if
a record is deleted, the corresponding record on the desktop is not
If you find you don't need this relationship, all you really need to do
is "publish" your table. Starting in version 11, Visual CE has a "publish"
operator (-->>) you canuse to do this.
If you have an older version of Visual CE (or you don't want to use Visual CE's
publish operator), here's an alternative way to publish your data:
- Put a few records in the table on the desktop and use Visual CE's
FILE | DOWNLOAD TABLE to copy the table to the handheld. When asked
if you want to keep the table synchronized, respond NO. When asked
if you want to create a form, say YES and download the form to the
handheld. For example, if you are downloading the PARTS table,
you might call the form PUBLISH_PARTS.VCE.
- Run the PUBLISH_PARTS.VCE form on the handheld and select
OPTION | EXPORT. This will create a file called PARTS.TXT and this
file will be in the same folder are PUBLISH_PARTS.VCE on the handheld.
- Using ActiveSync, copy the PARTS.TXT file you created in step (2) to
- Back in Visual CE's development environment (step (1)), select
EDIT | MACRO/EVENTS. Create a new macro called STARTUP. This macro
will three steps:
- OPTION | CLEAR
- OPTION | IMPORT
- RECORD | CLOSE
- Press the EVENTS button and set the STARTUP event to run the STARTUP
macro. Press OK. Press CLOSE.
- Download the form to the handheld (FILE | DOWNLOAD FORM).
- Look at the file you brought to the desktop in step (3). This will
show you the format that Visual CE expects the import file to be in.
Create a file formated in this way with all the records you want to be
published. Call this file PARTS.TXT.
- Using ActiveSync, copy PARTS.TXT to the handheld. Put it in the same
folder as PUBLISH_PARTS.VCE.
- Start PUBLISH_PARTS.VCE on the handheld. Visual CE will read the
part information from the file and put it into the table.