Hello All !
i create a pdb with pdbmake which contains 3 fields and ~100 raws but when i
try to read it, i can't get each fields separatly ! For example :
Name    Town        Phone
------------------------
Paul    ;    Paris    ;    0601
Bob    ;    London ;  0602
Luis    ;    Madrid  ; 0603
...
i want to get separatly only the name or the town or the phone !
i create this struct :
typedef struct {
  char Name[20];
  char Town[20];
  char Phone[10];
   } Clients;
then :
// a part of my code
  for(i=0;i!=cnt;i++) {  // all the records
           h = DmQueryRecord(dbR,i);
           record =(Clients*) MemHandleLock(h);
           char * part1;
           char * town;
           part1= StrChr(record->Town,';');
           int longueur = StrLen(record->Town)+1 - StrLen(part1);
           town=(Char*)MemPtrNew(longueur );
           StrNCopy(town,record->Town,longueur -1);
           ville[longueur -1] = '\0';
           MemPtrFree(town);
           MemHandleUnlock(h);
  }

is it wrong ?

Any ideas would be appreciated !
THX





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