Thanks for the response, David.

I think we're saying the same thing.  By "invalid" I meant the sort of
invalid that causes DmFindRecordByID to throw an exception, thus causing
users of my app to have to reset the unit.  I believe that's what you're
talking about when you say "... that's what the code checks".

A unique ID less than 0xffffff, but which doesn't happen to be associated
with any record won't cause DmFindRecordByID to throw an exception, but it
will cause it to return dmErrUniqueIDNotFound.

Since I'm trying to bullet-proof my code against a corrupt unique ID (held
in my app's preferences to identify the "current" record), checking for a
value over 0xffffff allows me to avoid the exception, and I can just fall
back to the first record as the "current" record.  All of this is just to
buy me time while I figure out _why_ the unique ID in the prefs is getting
corrupted.

Are we saying the same thing here?

Thanks,

Mark Peters

> From: David Fedor <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> Date: Wed, 19 Apr 2000 13:57:58 -0700
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Subject: Re: "invalid uniqueID passed" error?
> 
> 
>> My assumption here is that _any_ value less than or equal to 0xffffff is a
>> valid unique ID and hence won't cause this blowup - can anybody confirm that
>> this is correct?
> 
> You're sort of right, but not completely.  Any unique ID greater than
> 0xffffff is guaranteed to be invalid. That's easy, and that's what the code
> checks right there.  However, if there's no record with a given unique ID,
> then I'd still say you've got an invalid ID there.
> 
> So being <= 0xffffff is necessary but not sufficient to be valid.
> 
> -David Fedor
> Palm Developer Support
> 
> 
> 
> 


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to