home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!caen!deccrl!news.crl.dec.com!dbased.nuo.dec.com!nntpd.lkg.dec.com!nntpd2.cxo.dec.com!tincup.enet.dec.com!lindsey
- From: lindsey@tincup.enet.dec.com (Randy Lindsey)
- Subject: Re: File/Record locking in Foxpro 2.0
- Message-ID: <1992Nov20.003835.7786@nntpd2.cxo.dec.com>
- Sender: usenet@nntpd2.cxo.dec.com (USENET News System)
- Organization: Colorado Software Solutions, Inc.
- References: <MONTY.92Nov16043550@blackhole.lerc.nasa.gov>
- Distribution: comp
- Date: Fri, 20 Nov 1992 00:33:22 GMT
- Lines: 27
-
-
- In article <MONTY.92Nov16043550@blackhole.lerc.nasa.gov>, monty@blackhole.lerc.nasa.gov (Monty Andro) writes...
- >
- >Hello,
- >
- >I have a few questions on a group of Foxpro commands that auto lock
- >files and records like READ, SHOW GETS, etc ... These commands lock
- >the record or file before executing. Do these same commands unlock
- >the record or file after they complete? If these same commands unlock
- >the record after completion, do all other previously placed locks on
- >other records get released in addition to the one placed by the
- >command?
-
- Yes, the commands that auto-lock things also auto-unlock them when done.
- I think they do the unlock when you move to another record, rather than
- when the command itself completes, but I'm not certain. The documentation
- and/or help file talk about this.
-
- If you're using SET MULTILOCKS ON, I think the assumption is that you're
- doing your own locking (RLOCK), since the auto-locking would only lock
- a single record at a time. You might get confused or suffer a deadly
- embrace by mixing multiple locks with auto-locking, so you'd probably
- be best off to lock manually. And always lock in the same, predictable
- order (e.g. lock the parent before attempting to lock the child) so you
- can avoid an embrace.
-
- Randy Lindsey
-