Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking a Clipper table from a Fox pro app

Status
Not open for further replies.

Datadis

Programmer
Oct 19, 2000
18
CA
Someone can tell me where I can find the Lock information on a Clipper and a Fox Pro Table when performing a Rlock() command (I know the information isn't write at the same place in the file and I want to know if a Dbase IV table has been locked in a Clipper application when trying to lock it by my Fox app).
 
I believe that file locking is actually handled by the OS - not FoxPro. There is nothing to check in the file.

Rick
 
I don't think so cause I'm trying to lock the record in a Fox pro app while the record is already locked in a Clipper app and I can still lock it with Fox, but if I lock the file from a Clipper app in both way I can't lock it twice. I though maybe the Set Multilocks was On but it's Off.
 
I'm not sure that proves anything but that Clipper and FoxPro do it different. If it was stored in the DBF, how would an application with say a table of a couple hundred thousand records, running on hundreds of workstations each with multilocks set, manage to put all this information into the few "reserved" fields in the header?

Rick
 
They do lock files slightly different. In clipper you are able to look at a record on the screen or view it, but to update it or even use the read clause you have to get a lock on it first. Fox will allow you to automatically lock records when you go into this same mode, and you do not even have to do a rlock(). Are you able to actually modify the record at the same time in both applications? Also are you using the cdx driver with clipper? Or you mentioned Dbase IV so are you using the MDX driver? Clipper does not handle certain things the exact sme was as Fox does. The For clause in an index does not work the same way, and you will also get bad results and a mild form of corruption from doing this. What is the purpose of having both types of applications running at the same time?
 
The Clipper app isn't from our company. We have an agrement with the company owning the Clipper app to use theirs tables
and we must update them.

The Clipper prog use the Cdx driver.

When I tried to lock the record with my Fox app (with the Clipper app locking it), the last update was kept. So if I'm updating the table with a Replace after replacing data in the Clipper app, my informations are kept only.

Where can I get the locking informations in both Language ?

 
Datadis,

It sounds like the clipper application is not working directly on the file. You are making a change when you exit the screen or moving somewhere else. The information you are changing are in variables and do not commit to the table until they tell it to. So there may not be a lock at that time. you may just be viewing the record in Clipper. Will both applications be using the data at the same time? You must be very very careful with those indices. If any For clause is used you will run into a problem sooner or later. Fox and Clipper even using the CDX RDD are not the same when handling the for clause. I'm presently working with apps the exact same way. I copy the data and and test in another area, not off the live information being used by the clipper application. They never will run together in my case.
 
It use the same data but I can't modify the same record at the same time. I test it with two Clipper apps using the files with Rlock and it work fine (can't do the Rlock) but not with Fox. I'm 100% sure the soft is locking the file while editing a record.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top