Apps should lock records for writing, but lots of times they don't. If
you have the handle to a record, you can lock it and change it without
setting the busy or dirty bits.

I would try to trap DmQueryRecord, which is the other way to get the
record handle, but doesn't set the busy bit. Even trapping this might not
give you the *last* opened record, because the app may cache Handles.

Another idea, is trapping DmSetRecordInfo. If the app is intereset in
using the dirty bit for synchronizing, it may call it after changing the
record.

Richard Bram wrote:

> Hi,
> My hack is trying to find a way to know which record was last open
> when an app quits. I see that I can trap DmReleaseRecord() in MemoPad
> to catch the closing record information, but this doesn't seem to
> work in apps that use tables. Strange, since I thought that
> attaching a record to a table would mark it as busy, and I was
> under the impression that DmReleaseRecord was the only way to
> clear the busy bit (obviously wrong). Anybody know a simple
> way to find out this information from the build-in apps ? (other
> than manually reading their preferences, I'd like a general solution
> if possible)
>
> Thanks,
>
> Rick Bram

--
Sergio Carvalho
---------------
[EMAIL PROTECTED]

If at first you don't succeed, skydiving is not for you


Reply via email to