Also the length of the string is not know because it is a field
read from a database


StrCopy( letter, "A" );
err = Open(); // routine to open database
pForm = FrmGetActiveForm(); // get active form
lsp1 = FrmGetObjectPtr(pForm, FrmGetObjectIndex(pForm, frmList1)); // get id of 
list control
        
nRecordIndex = DmNumRecords(dbPtr); // number of records

for(index =0; index < nRecordIndex; index++) // lets index through database
         {
          h =DmQueryRecord(dbPtr, index); // lets query each record
          p = (Char *) MemHandleLock(h); // lets lock each record
      if( 0 == StrNCaselessCompare( letter, p, 1) )
           {
            // so here is the problem area we are talking about
           }
          MemHandleUnlock(h); // unlock each record 
         }
        LstSetListChoices(lsp1,strArray,index); // clear list
        LstDrawList( lsp1 );
        err = CloseDB(); 
        return true;
}
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to