home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!spool.mu.edu!clark!pacifier!nathans
- From: nathans@pacifier.rain.com (Nathan Silva)
- Subject: File/record locking in Clipper
- Message-ID: <C1FKur.CpA@pacifier.rain.com>
- Organization: Pacifier BBS
- Date: Mon, 25 Jan 1993 22:23:13 GMT
- Lines: 23
-
-
-
- How does Clipper perform file locking (internally)? I am trying to
- write a C program that can access Clipper .DBFs.
-
- I've figured out that when you RLOCK(), Clipper locks one byte of the
- file, beginning at logical byte 1 billion + <record number>. I've also
- had success duplicating FLOCK() by locking a region <# of records> long,
- beginning at byte 1 billion.
-
- But what if I need to update something that is stored in the
- header -- for example, the LASTREC() value. Is there a "magic" region
- that I should lock, such as byte 999,999,999? Or should I actually
- physically lock the header region.
-
-
- Nathan
-
- --
- -------------------------------------------------------
- | Nathan Silva | |
- | nathans@pacifier.rain.com | Do the World News Polka! |
- -------------------------------------------------------
-