Getting Error Reading File and shows a non-existent path in the machine in VFP8 SP1 or later  
Author Message
PCSQL66





PostPosted: Visual FoxPro General, Getting Error Reading File and shows a non-existent path in the machine in VFP8 SP1 or later Top

What are the possible causes of Error Reading File So far, I find the MS article about TS connection issue. I also find some information that it may be related to unstable network connection. If the error is caused by unstable network connection, will it be logged in the Event Viewer

The main mystery of my issue is that the entire error message is:

Program Error

Error reading file

C:\docume~1\XXXXX\locals~1\temp\YYYYY.fxp

YYYYY.fxp is a fxp inclued in the VFP exe.

But the XXXXX is not a user on that machine but rather the developer who built the exe.

It seems that VFP may have included the Temporary File location information from the VFP environment of the developer machine which was used to build the exe.

What other information is encrypted into the exe

I cannot figure how to explain to users about the XXXXX.

I hope some MS persons can provide me an answer on this.



Visual FoxPro1  
 
 
CetinBasoz





PostPosted: Visual FoxPro General, Getting Error Reading File and shows a non-existent path in the machine in VFP8 SP1 or later Top

Remove the path from the call in your routine and rebuild it after adding the file to project (why use a temp folder anyway, directly use its prg).
 
 
JGoad





PostPosted: Visual FoxPro General, Getting Error Reading File and shows a non-existent path in the machine in VFP8 SP1 or later Top

I've been seeing this same problem--it's always with my procedure file. Have you come up with a solution yet

Thanks,

Jon



 
 
Don Higgins





PostPosted: Visual FoxPro General, Getting Error Reading File and shows a non-existent path in the machine in VFP8 SP1 or later Top

The solution is simple.

1) Include the file in the project

2) Do not hard code the path for the prg. For example DON'T call the prg like this:

DO c:\VFP_Development\my_app\my_prgs\myprogram.prg

Instead call it using the relative path, such as:

Do my_prgs\myprogram.prg

3) Make sure you don't use the FXP in the project, unless it is excluded. The FXP can't be compressed.

There should be no problem using prgs in projects. Most of us do it all the time.



 
 
JGoad





PostPosted: Visual FoxPro General, Getting Error Reading File and shows a non-existent path in the machine in VFP8 SP1 or later Top

1. The PRG file is included in the project.

2. The path is not hard-coded. Because this is a procedure file, the only place it's used is like so:

SET PROCEDURE TO cbsproc ADDITIVE

3. The FXP is not used in the project--only the PRG.

I use tons of PRG's in all of my projects, so I know that there's no problem with that.

The interesting thing is this: if you issue SET PROCEDURE TO like in my example above, and then call SET('PROCEDURE') inside your app, it returns 'CBSPROC.FXP'. FILE('CBSPROC.FXP') returns False (.F.). So it's like the procedure is set to a non-existent file. I've also noticed that if you're actually running VFP instead of a runtime VFP application and issue SET PROCEDURE TO a PRG, VFP automatically compiles the PRG to create the FXP. So what I suspect is that maybe when you call SET PROCEDURE TO in your runtime app, it creates a temporary FXP file on disk somewhere, and either that temporary file is getting deleted, or VFP "loses" its location somehow. I have tried running my runtime app and then looking in the path of the error message, but the file isn't there.

Thanks,

Jon