Record locking

Mike Schwartz-PC Support & Services mschw at athenet.net
Wed Mar 31 06:09:12 PST 2004


> I wasn't going to comment on this thread because I had heard it in the FP
> Room and didn't know what to offer toward solving it... but since both of
> you have shown this code...
> 
>     write filename;  close filename
> 
> and say it is a good (and even necessary) syntax... it just has to be
> said.

John:

	I did mention in my post that the "write" is probably unnecessary.

[snip]

>>	...I usually do a "write" then "close", then "sync".  I probably
>> just need to do "close" then "sync".

[snip/]

	I started doing that some 20 years ago and found that it was
working, so you will see it in my older code and, of course, the code works
with the superfluous "writes".  It is just a wasted write command.  Sorry if
it is inelegant.  I'm trying to break myself of that habit, but it is in
hundreds of procs that I've written.

	We did post code about 5 years ago when this first started happening
in the Windows version of filePro on certain hardware (circa 1998).  The
issue was resolved by simply adding a "sync" command after writes and
closes.  

	I've not had this problem on any Unix/Xenix systems, so I can't post
any code that would demonstrate the problem on your computer.  I've not
tested this recently, like on any release of filePro 5.0.  I've also not
tested it with any newer hardware.  For example, maybe the newer IDE hard
disk controllers don't have this problem anymore.

	Perhaps I don't need the "syncs" at all any more.  I will try to
test this again next time I have a few spare minutes while I'm at one of my
fp Windows user sites.  However, I'd have to do some in depth testing,
because these customers are still running some of the 900 Mhz Windows '98
computers that exhibited the problem.

	Until then, I'll keep putting the "syncs" into my Windows code, just
as a precautionary measure...
     
Mike Schwartz
PC Support & Services



More information about the Filepro-list mailing list