Hi
Thanks for the reply.  I guess I missed a step... I take the comma separated
file and convert it to a PDB file then sync it to the database I have on the
palm.   How do I make a database on the palm able to handle a PDB file being
sent to it for syncing and it has a different number of fields per row each
time the syncing is done? The few databases I have done on the palm I set
the start of the fields by using defines.  These are great when you use the
Palm as the data entry tool... but I want to send data to the Palm from a
desktop database of information.  Each time I sync for each row of the
database there will be a different number of columns. Some rows may have  20
columns and some may have only 11 or 14 or 59, etc.  I do not know how to do
this.  Maybe I am missing the boat big time on this one, but I can not see
how to do it.

Here is what I have done in the past to set the offsets for the start of
each field and the record size of each field.

#define db_id_start             0
#define db_id_size              (sizeof( ULong ))
#define db_fname_start          (db_id_start + db_id_size)
#define db_fname_size           16
#define db_lname_start          (db_fname_start + db_fname_size)
#define db_lname_size           16
#define db_param1_start         (db_lname_start + db_lname_size)
#define db_param1_size          16
#define db_value1_start         db_param1_start + db_param1_size)
#define db_value1_size          16
#define db_param2_start         (db_lname_start + db_lname_size)
#define db_param2_size          16
#define db_value2_start         db_param1_start + db_param1_size)
#define db_value2_size          16
#define db_param3_start         (db_lname_start + db_lname_size)
#define db_param3_size          16
#define db_value3_start         db_param1_start + db_param1_size)
#define db_value3_size          16
.....

The params and value sizes are initially set to 16 which should be able to
handle the max lengths of these params and values.  The problem is there may
be more or less params and value pairs with each syncing process.   How do I
set these offset points for the starts of each record in the database after
the syncing?

Does that help?  Am I way out in left field here?  There has to be a way to
query each row of the new synced data in the database to determine the
number of fields per row.  From that I can strip off the first couple of
standard fields and then determine the number of param and value pairs there
are.  No?

Thanks in advance
Dean-O


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard
Burmeister
Sent: Wednesday, May 16, 2001 6:38 PM
To: Palm Developer Forum
Subject: RE: Question about syncing comma separated file


> From: Dean Rochester
>
> I have a database application I am writing and the data comes to the Palm
> device as a comma separated file.
>

Maybe I'm don't understand what you are asking.  What do you mean by "the
data comes to the Palm device as a comma separated file"?  The normal way to
store data on a Palm device is to use a database.  The only way you could
have a database be a "comma separated file" would be to store a single
string of data with commas separating the fields,  If you have done that,
then you just read 1 record from the db, then parse that record into fields
based on where the commas are.

> The problem I have is that the
> columns of data is not the same each time.

That is no problem with a Palm database, which is just a collection of
records, each containing up to 64K of whatever you want to put there.



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


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

Reply via email to