I've run into what looks like a timing or initial condition problem of some
kind with DmGetRecord. In my app, I do a couple DmQueryRecord calls on a
particular record while setting up a form to edit it. When the user presses
the OK button (whether something was changed or not), the app does a
DmGetRecord in order to get a handle that can be used to modify the record.
If I run this program in POSER under the debugger, with no break points, the
DmGetRecord call fails with a "Err getting rec" error. After POSER resets,
if I run the app again, with or without the debugger, and perform the same
operation under the same circumstances, it doesn't fail. If I return to the
original conditions by closing the POSER document and opening the fresh one
I used to begin with, run the app under the debugger, but this time with a
break point set before the DmGetRecord call and then let execution continue
after the break, it doesn't fail.
The record has the dirty bit set, but all else looks normal. From the docs
it would appear that the only way a DmGetRecord call can fail (assuming a
valid db ref and db index), is if the record has already been retrieved by a
DmGetRecord call without an intervening DmReleaseRecord. I don't think I'm
doing that, and the fact that the call works after the first failure lends
support to that.
Has anybody seen this behavior? What else could be causing this, if
anything? Is "Err getting rec" the error I _should_ get if I try to get a
record that is already "gotten"?
Thanks,
Mark Peters
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html