I am failing to lock a database file on a unix server (Solaris486) when the file lock request is sent from Visual Foxpro on Windows 95. Any suggestions on testing procedures, or even a solution?? 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. 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? And does a successful SAMBA lock apply to all possible write access to the locked file, by whatever means the file is shared out? Jan St. George's Hospital, London U.K. j.poloniecki@sghms.ac.uk tel: +44 (0)181 725 2795 a.m. (0)181 672 4122 p.m.
J Poloniecki writes: > I am failing to lock a database file on a unix server (Solaris486) when > the file lock request is sent from Visual Foxpro on Windows 95. > > Any suggestions on testing procedures, or even a solution?? > > 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. > > 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? > > And does a successful SAMBA lock apply to all possible write access to > the locked file, by whatever means the file is shared out? What version of samba are you using. The latest version (1.9.18p1) has new oplock support, that may help you with this
> 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. j- -- ________________________________________________________________________ Gerald ( Jerry ) Carter Engineering Network Services Auburn University jerry@eng.auburn.edu http://www.eng.auburn.edu/users/cartegw "...a hundred billion castaways looking for a home." - Sting "Message in a Bottle" ( 1979 )