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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sharing files under WinXP Pro Network

Status
Not open for further replies.

blumash

Programmer
Oct 2, 2003
50
HU
I have a program which I try 2 use in 2 computers on a local net , this program is not doing any updates or new record to the file but still when I try to excute the program from 2 computers same time in one of them I recive a massage "file acsses denied" , the file is open by the program exclusive off & still I can't use the program in 2 computer in the same time.

Thank's
 
I forgot to write that when I open a file manualy from the Fox 2.6 developing screen I can open it in both computer same time but...... when the the .EXE file is excuted then can't be excuted from both computers.
 
In general with FP2 FPW2 etc it was necassary to set the properties of the .exe .bat and config.fp or config.fpw as readonly + any shared library files on the server and if the shortcut shared an .ico file even that was marked as readonly.

But another issue is Foxuser.dbf and fpt which also creates problems if not readonly yet needs to be written to!!! To get round this we used a copy of the foxuser renamed as resource.dbf .fpt etc and placed the line SET RESOURCE TO resource.dbf in the early part of our main.prg this way when the app was launched FP used the default FOXUSER file (readonly) but then wrote to the RESOURCE file when running which was not readonly.

Bob Palmer
The most common solution is H2O!
 
We have not experienced that problem since we separated the data from the operating application files. We have an 8 user system with everything from Win 95 to XP Pro. All the users have the exe, supporting runtime files, config file and their own foxuser file on the local machine. Only the data files, help files and report formats are on the machine that serves as a "server". In each config file we set the dos path so that the application looks for the data on the server and set the resource explicitly to the local version of the file. Foxpro handles shared files very well this way.

When we first started up we tried to share the resource and exe files with no success.

Steve
 
thread182-831085
Article located by theRambler:
How do I resolve the "Sharing Violation Reading Drive" error?
Updated Tuesday, February 06, 1996
Follow these six troubleshooting steps:
1. Verify that each user has a FOXUSER.DBF file.
2. Verify that the CONFIG.FP file on the server includes the EXCLUSIVE=OFF statement. If EXCLUSIVE=OFF is used, database files can be shared.
3. Verify that the CONFIG.FP file on the server includes the RESOURCE=OFF statement, or that each user's FOXUSER.DBF and FOXUSER.FPT files are marked read-only.
4. Verify that the FOXPRO.EXE, FOXPROX.EXE, and FOXR.EXE files are marked read-only.
5. If you use the Distribution Kit to create a stand-alone application (.EXE), verify that the .EXE file is marked read-only.
6. If you create compact executable files, make the .ESL and .ESO support files read-only.
7. In some cases, the MS-DOS SHARE program must be loaded on the server and on each workstation. Specify the /F and /L parameters as follows:
SHARE /F:5120 /L:500.

Also, I've read comments here where there are differences with compact exe's and extended ones. Maybe you can try searching for questions regarding the different compilation methods, and which are better than others?

When you work out the solution, be sure to post it and let us know.

dbMark
 
I almost solved the problem completly , first I find out when using the Environment for setting up files in a screen for example it will always be written in the program like "USE h:\foldname\myfile.dbf" , when excuting the same program from a network computer always appears a error massage file h:\foldname\myfile.dbf does not exist , after clearing the Environment in a program & instead open the files from the Screen Setup Code , there I just wrote the name of the file "USE myfile.dbf" the program is always looking for the file in the local folder and i's working now wery well on all the computers in the network.
 
Blumash

This is a very good reason why NOT to use the local install method as it relies on a mapped network drive that the exe refers too. It is not good practice to "hard wire" paths in an app. Instead you should use a global variable as a root file directory anchor e.g. gl_path=sys(5)+sys(2003)+"\" defined at the top of your main prg. if you then SET DEFAULT TO (gl_path)

Bob Palmer
The most common solution is H2O!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top