> As I don't use DmGetRecord at all (preferring DmQueryRecord, even when I
> call DmWrite later), how can I en up leaving records busy? Can this

I'm not sure if it's causing any harm, but DmQueryRecord is meant for
read-only access to records (according to Palm OS Reference).  Is there any
reason you prefer not to use DmGetRecord other than it setting the busy bit?
The busy bit is meant to help programmers correctly access the database
information, not to be a burden.  Perhaps this is causing a problem when you
write to a record without the busy bit being set.

You can call DmReleaseRecord to reset the busy bit for the record.
Typically DmGetRecord and DmReleaseRecord are used in pairs much like
locking/unlocking memory handles.  You can use DmRecordInfo to return the
state of the busy bit for a record.

DmWrite doesn't set the busy bit, but as writing to a database record should
be done via DmGetRecord, the busy bit should already be set when writing
data to the record.

-- 
Tim Kostka
http://www.nuprograms.com


"Luc Le Blanc" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At this point, by far the most current error I get in POSE either
> testing or running the Gremlins is "Records left locked" or "Records
> left busy" in closed unprotected DB.
>
> As I don't use DmGetRecord at all (preferring DmQueryRecord, even when I
> call DmWrite later), how can I en up leaving records busy? Can this
> induce problems when I re-open the DB, like when trying to accesss a
> busy record?
>
> Regarding locked records, how can I tell which records are locked? There
> is no such Record Attribute Constant defined. I gather I must have a
> MemLock( recordHandle ) not matched by a MemUnlock somewhere. Or can
> there be another reason?
>
>
> --
> Luc Le Blanc
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to