home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / 9405 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.1 KB  |  33 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!spool.mu.edu!clark!pacifier!nathans
  3. From: nathans@pacifier.rain.com (Nathan Silva)
  4. Subject: File/record locking in Clipper
  5. Message-ID: <C1FKur.CpA@pacifier.rain.com>
  6. Organization: Pacifier BBS
  7. Date: Mon, 25 Jan 1993 22:23:13 GMT
  8. Lines: 23
  9.  
  10.  
  11.  
  12. How does Clipper perform file locking (internally)?  I am trying to
  13. write a C program that can access Clipper .DBFs.
  14.  
  15. I've figured out that when you RLOCK(), Clipper locks one byte of the
  16. file, beginning at logical byte 1 billion + <record number>.  I've also
  17. had success duplicating FLOCK() by locking a region <# of records> long,
  18. beginning at byte 1 billion.
  19.  
  20. But what if I need to update something that is stored in the
  21. header -- for example, the LASTREC() value. Is there a "magic" region
  22. that I should lock, such as byte 999,999,999?  Or should I actually
  23. physically lock the header region.
  24.  
  25.  
  26. Nathan
  27.  
  28. -- 
  29.  -------------------------------------------------------
  30. | Nathan Silva               |                          |
  31. | nathans@pacifier.rain.com  | Do the World News Polka! |
  32.  -------------------------------------------------------
  33.