In article <88758@palm-dev-forum>, [EMAIL PROTECTED] says... > > I'm writing my first database code. I copied this simple function out of > the Palm OS Programming Bible, but its not returning. Or, it wasn't until I > made it quit when the count rose to 10000. It seems so straight forward, > I'm at a loss what's going on. Any insight would be greatly appreciated.
DmGetNextDatabaseByTypeCreator will return a false (0) result if another DB was found, and a true (dmErrCantFind) result if there are no matches. You need to add a "!" operator in front of your call to this function in your while loop to exit at the right time. > } while (count < 10000 && DmGetNextDatabaseByTypeCreator(false, > &searchState, > type, creator, false, &cardNo, &dbID)); -- Ben Combee <[EMAIL PROTECTED]> CodeWarrior for Palm OS technical lead Get help at http://palmoswerks.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
