Thanks for your info.

I am sorry I did not provide enough information.  This is for a database
record.  My application needs to store a master-detail relation ship.  For
each record in menugrp struct type will held several IDs.  I do not want any
repeated duplicate IDs with different menugrp.  Is this possible ?
For example:
    I have menugrp 3 records:  menu01, menu02, and menu03.
    For menu01, it will store ID No:  001, 002, 003, 004, and 007.
    For menu02, it will store ID No: 002 and 006.
    For menu03, it will store ID No: 001, 003, and 004.

I have a problem on resizing the array of struct in menugrp struct type.
This means that I have to make an allocation in memory for each of my record
data.  Any idea?
Again, thanks in advance for any solution.

Regards,
S. Santoso


"Butch Howard" <[EMAIL PROTECTED]> wrote in message
news:26368@palm-dev-forum...
>
> If this is for a database record I would NOT define the storeID as part of
> the struct.  I would instead just define the database to start with this
> struct followed by a list of storeID structs to the limit of the record
> size.
>
> If this is for an in memory  block (say that would be read from the record
> into some temp space), I would have a struct that held the header struct
> plus a pointer to a list of storeId structs (an array):
> typedef struct {
> DWord anyID;
> } storeID;
> typedef struct {
>          char            itemgrpID[2];
>          char            itemgrp [30];
>          UInt            numItems;
> } recordheader;
> typedef struct {
> recordheader hdr;
> storeID* IDList;
> } storeInfo;
>
> >    typedef struct {
> >         DWord        anyID;
> >     } storeID;
> >
> >     typedef struct {
> >         char            itemgrpID[2];
> >         char            itemgrp [30];
> >         UInt            numItems;
> >         storeID       qstID[1];
> >     } menugrp;
> >
> > Let say that I want to input a new record which has 2 stored
> > ID.  I have to
> > change qstID[1] to qstID[2].  How do I process this?  Any help is
> > appreciated.
> >
>
>



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