Visual CE - HP Database Import Utility

This utility will allow you to move data from an HP 200LX database into a
Visual CE database.  To do this, do the following:

1) Export the data from the HP 200 LX to a comma delimited text file. The
   "Suppress First Output Line" option should not be specified.  This will
   create a .CDF file (for example, MYDATABASE.CDF)

2) The CDF file you create does not specify the datatypes of the columns,
   only the names of the columns and their values.  If you only have
   text fields, go to step (3).  Otherwise you will need to specify the
   datatype of each column.  To do this, open the .CDF file using a text
   editor such as WordPad.  On the first line of the file, you should see
   the name of the columns.  After each column name (and inside the quotes),
   add one of the following type designators:

                     @T   for text
                     @L   for long text (memo fields)
                     @N   for a number that contains no digits to the right
                                if the decimal point
                     @N*  for a number that contains 1 or more digits to the
                                right of the decimal point, such as a money
                                value.  Note: this utility will round
                                the value to two decimal places.
                     @D   for a date
                     @M   for a time
                     @O   for an option (radio) button
                     @O*  for the first option (radio) of a group of options
                     @C   for a checkbox
                     @G   for a category

       For example, if the first line of the .CDF file looked like this
       (note: The header line is too long to fit on a single line in this
       document.  Although it spans two lines in the examples shown, the
       header line must be on a single line):

                 "Name","Age","Salary","Hired Date",
                 "Male","Female","Blue Eyes","Brown Eyes"

       change it to this:

                 "Name@T","Age@N","Salary@N*","Hired Date@D",
                 "Male@O*","Female@O","Blue Eyes@O*","Brown Eyes@O"

       See "SPECIAL NOTE ABOUT OPTION BUTTONS" below.

3) Install Visual CE if you haven't already.

4) Run HPIMPORT.EXE.  You will be prompted for the name of the .CDF file.
   The .CDF file will be imported into a Visual CE database.  The name
   of the database is the name of the .CDF file (for example, the file
   C:\DATA\MYDATA.CDF will be imported into a Visual CE database called
   MYDATA.

   If the database already exists on the Windows CE device, an error will be
   displayed.  You can delete the database by selecting FILE | DELETE DATABASE
   in Visual CE.

5) You can now create a form on top of this database by using Visual CE.


               ****** SPECIAL NOTE ABOUT OPTION BUTTONS ******

Visal CE and the HP 200LX treat option buttons differently.  If there are
five options, the HP 200LX has five columns (one of which has the value
1 and the others are zero).  Visual CE uses a single column with five
different values to specify the option (when creating a radio button in
Visual CE, for each radio button you are asked for a 'Name' and a 'Value': 
this is what you use as the 'Value').  This import utility will do a
conversion as follows:

        HP 200LX                        Visual CE
 Opt1  Opt2  Opt3  Opt4  Opt5             Value

  0     0     0     0     1            00001 (binary) =  1 (decimal)
  0     0     0     1     0            00010 (binary) =  2 (decimal)
  0     0     1     0     0            00100 (binary) =  4 (decimal)
  0     1     0     0     0            01000 (binary) =  8 (decimal)
  1     0     0     0     0            10000 (binary) = 16 (decimal)

The name of the column in the Visual CE database will the name of the
first option button.

For example, if you had the following HP 200LX database with two sets of
option (radio) buttons: one for Gender (Male, Female) and one for Eye Color
(Blue, Brown, Green):

       "Male@O*","Female@O","Blue Eyes@O*","Brown Eyes@O","Green Eyes@O"
           0         1          0                0             1
           0         1          0                1             0
           0         1          1                0             0
           1         0          0                0             1
           1         0          0                1             0
           1         0          1                0             0

              Note the '*' in the "Blue Eyes" type designator to specify
              that Blue Eyes is the first of a second set of option buttons

The Visal CE database would be:

                  "Male"               "Blue Eyes"
                     1                      1
                     1                      2
                     1                      4
                     2                      1
                     2                      2
                     2                      4

Note: you probably want to change the header line in the CDF to specify the
correct column name for the Visual CE database.  In the example above, if
you change the header line to:

       "Gender@O*","Female@O","Eye Color@O*","Brown Eyes@O","Green Eyes@O"

The Visal CE database would have the columns "Gender" and "Eye Color",
rather than "Male" and "Blue Eyes".
