home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / database / 7961 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.8 KB  |  40 lines

  1. Newsgroups: comp.databases
  2. 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
  3. From: lindsey@tincup.enet.dec.com (Randy Lindsey)
  4. Subject: Re: File/Record locking in Foxpro 2.0
  5. Message-ID: <1992Nov20.003835.7786@nntpd2.cxo.dec.com>
  6. Sender: usenet@nntpd2.cxo.dec.com (USENET News System)
  7. Organization: Colorado Software Solutions, Inc.
  8. References:   <MONTY.92Nov16043550@blackhole.lerc.nasa.gov>
  9. Distribution: comp
  10. Date: Fri, 20 Nov 1992 00:33:22 GMT
  11. Lines: 27
  12.  
  13.  
  14. In article <MONTY.92Nov16043550@blackhole.lerc.nasa.gov>, monty@blackhole.lerc.nasa.gov (Monty Andro) writes...
  15. >Hello,
  16. >I have a few questions on a group of Foxpro commands that auto lock
  17. >files and records like READ, SHOW GETS, etc ...  These commands lock
  18. >the record or file before executing.  Do these same commands unlock
  19. >the record or file after they complete?  If these same commands unlock
  20. >the record after completion, do all other previously placed locks on
  21. >other records get released in addition to the one placed by the
  22. >command?
  23.  
  24. Yes, the commands that auto-lock things also auto-unlock them when done.
  25. I think they do the unlock when you move to another record, rather than
  26. when the command itself completes, but I'm not certain.  The documentation
  27. and/or help file talk about this.
  28.  
  29. If you're using SET MULTILOCKS ON, I think the assumption is that you're
  30. doing your own locking (RLOCK), since the auto-locking would only lock
  31. a single record at a time.  You might get confused or suffer a deadly
  32. embrace by mixing multiple locks with auto-locking, so you'd probably
  33. be best off to lock manually.  And always lock in the same, predictable
  34. order (e.g. lock the parent before attempting to lock the child) so you
  35. can avoid an embrace.
  36.  
  37. Randy Lindsey
  38.