In article <82075@palm-dev-forum>, [EMAIL PROTECTED] says... > > > Also, using DmQueryRecord does not mark the record as > > busy (it is read-only), so there is no need to DmReleaseRecord (in other > > words you should not do this). > > You _shouldn't_ write to a record using a handle you get from DmQueryRecord, > but there's actually nothing preventing you from doing so, as least not in > Palm OS versions 1.0 through 4.1. I think some of our sample code includes > this questionable usage. If you don't want to run into problems in the > future, it pays to follow the rules, even when they aren't enforced.
Actually, one case where this could fail in current Palm OS implementions is if you were writing to a database on a HandEra 330 or TRGPro using HandEra's AutoCF software. This lets software modify DBs on expansion cards as if they were in main memory. On a DmQueryRecord, AutoCF would pull it into a cached MemHandle and you could write to it, but the change wouldn't get flushed back to the storage device when the database was closed. Using a DmGetRecord would turn on the dirty flag which would let AutoCF know that it had to commit the change. -- Ben Combee <[EMAIL PROTECTED]> CodeWarrior for Palm OS technical lead -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
