v1.5 user manual


 

Using the converter

prev    TOC    next
 

When dbconv.exe is started it reads the file dbconv.txt which holds the information about the conversions to perform. dbconv.txt is a simple ASCII file which can be generated by any text editor like for example the Windows standard editor NotePad. It must be in the same directory as dbconv.exe. Each line in dbconv.txt represents a conversion task, so multiple tasks can be processed in a batch mode.

WARNING: the converter overwrites the output files specified in dbcon.txt, so use it carefully.

PDB to CSV conversion

For a PDB to CSV conversion the line must have the following format:

file.pdb file.csv [-sep c]

file.pdb is the name of the db2go main database (the name of the associated list database is read from this file). file.csv is the name of the csv-file to which the database is to be converted.
The file names may include an absolute path or a path relative to the directory where dbconv.exe is located. If no path is given the files are read from resp. written to the dbconv.exe directory

The option -sep can be used to specify the character that is used as separator in the CSV file. By default this is ; but it can be changed to , via the option -sep ,.

Note: if the separator charater is used within a database entry the whole entry must be set in quotes. Most spread sheet programs do that automatically.

Hint: if you create or change db2go databases on your handheld they are saved to your PC during the next hotsync. Usually they are located in the directory
C:\palm\USER\Backup
with the name of the directory USER being somehow related to your Palm user name.

CSV to PDB conversion

For a CSV to PDB conversion the entry in dbconv.txt must have the following format:

file.csv [path] [-sort] [-sep c]

The names of the db2go database files must not be given here because they are read from the csv file (column 1, row 1 and 2). However, optionally a path string can be used to specify a directory where the pdb files will be put in.

The option -sort causes an alphabetical sorting of the objects and of the field name and item lists before conversion.

General topics

If the first non blank character in a line is a # the line is considered a comment and is excluded from processing.

dbconv.exe writes error messages and other information about the conversion process to the log file dbconv.log. See this file if a conversion does not yield the expected output files. Make sure that this file is accessable (that is to say not opened by an editor) before starting the conversion.

Example: See the file dbconv.txt included in the db2go distribution.

Tip: actually dbconv.exe does not read the file dbconv.txt but a file with the same base name as the program itself plus the extension .txt. Thus, if dbconv.exe were renamed to myprog.exe it would read the file myprog.txt.

Using this feature performing different conversion tasks can be reduced to just a double click in the file manager by generating an appropriately named copy of dbconv.exe and an associated .txt file for each task.