If I understand your question correctly, the problem is not so much how to
create a database, but rather, how to write your data into it. With a
relational database, these issues are related: you specify a schema when you
create a table, and this determines what data you can store in its records.
But with a Palm database, there is no schema; records do not even need to
have the same length. A Palm record is really just an untyped range of
memory, so there is no real limit as to what can be stored in it. Different
records in the same database can even be used to store different types of
data.

As to how to store your data: you can do anything you like, as long as you
know how to read it later. For instance, many people create a simple C
struct (with char arrays -- not char pointers -- to store strings), copy
their data into it, and then copy the struct into their record with DmWrite.
This creates 'fixed-length' record which allow random access to fields.
Others, to save space or to deal with uncertainty over field lengths, etc.,
copy data members in some predetermined order, using a signal of some sort
(such as a null character at the end of a string) to signify the end of each
field. This creates 'packed' records, which save space but do not allow
random record access. As I said, you can write anything you like, in any
order, as long as you know how to figure it out later.

Is this what you were looking for?

 ~ J.


"amit tipnis" <[EMAIL PROTECTED]> wrote in message
news:65431@palm-dev-forum...
>
> Hi,
>
>   I am a bit bad with databases, so I need some basic
> stuff to start with. I have a form with, say some n
> number of fields on the form. When I write a record to
> the database, i want all the values of these fields to
> be written to the database as a record. I just dont
> know how to create a database that will allow a
> database write function call write these field values
> in the database.
>
>   any one with any inputs is welcome.
>
> Thanks,
>
> Amit
>
> =====
> " TOUGH TIMES DO NOT LAST LONG BUT TOUGH PEOPLE DO "
>
> __________________________________________________
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com
>
>



-- 
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