Subject: Creating PDBs
From: "Mike" <[EMAIL PROTECTED]>
Date: Mon, 14 Jun 2004 18:43:04 -0700

This is sort of a newbie question but it's not.
I need to create a static database that I distribute.  The data was exported
from a text table to CSV.  I wrote a program to convert the CSV file to a
file that PDBMake would read and then PDBMake converted it to a PDB.

The problem is the Nulls.  I want each record to have a two byte binary
number (ID)  followed by null terminated text. This worked for every record
except where one of the two first bytes were 0x00.

Suggestions:

1) Start at 1 instead of 0 and hence get rid of the 0x00 tag

or

2) Use convert your number to a fixed length ascii character set, say 4 digits, and eliminate the use of binary value. That way you can have "0000" through "0679" without any problems whatsoever.
You could use just three characters with a ascii hex range characters "000" to "2A7", which is not the same as 0x2A7 even though it could be converted to and from that.
Or just two characters with a mod 36 (0-9, A-Z) based characters "00" to "HV", which uses even less space, but requires a big more programming to do the to/from conversions.


The other advantages of storing this field in some form of ascii format is that it eliminates the endianness problems of binary fields, and you can more easily view the file with some form of text editior.


Roger Stringer Marietta Systems, Inc. (www.mariettasystems.com)


-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to