Reputation: 6299
I know very little about FoxPro but have a project that requires working with a third-party application, based on FoxPro, and a .fxp file. The thrid-party app is a point of sale system and the makers of the software have provided a .fxp file that allows us to export product information into an XML format.
The problem that I am running into is that the software has no way to schedule the .fxp file to run at a regular interval which we need to keep that XML file updated.
My question is, can a .fxp file be executed outside of FoxPro?
Alternatively, can I create my own FoxPro application to execute their .fxp file and have it connect to the POS database to perform the export.
Any ideas or alternatives are welcome.
Thanks, Brian
Upvotes: 4
Views: 10894
Reputation: 26
If you don't have Visual Foxpro available ask the "makers" of the fxp to provide an executable (built in VFP) so that you can run the fxp.
If they are not willing to support you I'll be able to provide a "foxpro scripting host" which is a small runtime environment which can run stand-alone FXPs.
hope this help
Upvotes: 0
Reputation: 574
- can a .fxp file be executed outside of FoxPro?
An FXP file is a compiled Foxpro/Visual Foxpro source file (a PRG file).
So no, it can only be executed with FP/VFP.
- Alternatively, can I create my own FoxPro application to execute their .fxp file and have it connect to the POS database to perform the export.
First, we don't know if the FXP routine itself will connect to the data tables of the POS system. We can only assume that it does.
If so, then as others have indicated above, you can indeed write your own FP/VFP routine to run the FXP.
You would want to write your new routine in VFP9 so that its backward compatibility would support commands in your existing FXP utility regardless of what version that was written with.
Good Luck
Upvotes: 0
Reputation: 2226
You can call the FXP directly from the command-line to launch FoxPro. This would allow you to schedule the application through Windows Task manager or any other program.
Something like this in a BAT file: "C:\Program Files\Microsoft Visual FoxPro 9\vfp9.exe" c:\clients\myProgram.fxp
Upvotes: 2
Reputation: 422320
Write another FoxPro program and run it with "DO file.fxp" or import FXP file into a project, set it as startup and build.
Upvotes: 5