File lock

Gerald W. Carter cartegw at Eng.Auburn.EDU
Fri Jan 16 14:03:43 GMT 1998

> Please feel free to assume that I don't know anything about file locks!
> I don't even know how Visual Foxpro attempts to lock a file. 

My experience has been more with FoxPro 2.6 ( 16-bit ) but I think
things are still pretty much the same.

FoxPro has two modes for opening DBF files...exclusive and shared.  In
shared mode the file are not locked by one application but are available
to be opened multiple times.  Record locking ( for writes / reads to
each record in the table ) is handling by FoxPro itself and will have
nothing to do with samba.

In exclusive mode, FoxPro will attempt to gain a lock on the file thus
preventing multiple opens.

You should check to see what mode is currently set.  You can set modes
by typing 'set exclusive [on | off]' in the command window.

> Would the Foxpro lock be recognised by any application?
> i.e. does Foxpro request a SAMBA lock or does it attempt to keep some
> proprietary lock file that only other Foxpro applications would look
> for? 

I think that it is a standard locking mechanism
> And does a successful SAMBA lock apply to all possible write access to
> the locked file, by whatever means the file is shared out?

Yes.  I think so.

                            Gerald ( Jerry ) Carter	
Engineering Network Services                           Auburn University 
jerry at   

       "...a hundred billion castaways looking for a home."
                                  - Sting "Message in a Bottle" ( 1979 )

More information about the samba mailing list