
Launching an msdos application from Access 97
I use to launch a msdos application from Visual Foxpro with no problem.
Recently I decided to switch to Access 97 with no great success. Here is
the problem:
In Dos, the commmand line is : lindo.exe<filein
Where Lindo is the application and filein is the data file that is submitted
to lindo.
In Visual Foxpro my code is:
nom_in = "c:\.... .txt"
nom_out = c:\.... .txt"
fic_in = fcreate (ALLT(nom_in))
fic_out=fcreate(ALLT(nom_out))
SET SAFETY OFF
(corpus of the program):
FPUTS /FWRITE ...model and contraints
FPUTS(fic_in, "divert "+nom_out)
FPUTS(fic_in, "go ")
FPUTS(fic_in, "LEAVE")
= fclose(fic_in)
= fclose(fic_out)
To launch lindo ;
set default to c:\lindoind
run lindo< &nom_in
set default to c:\vfp\yansan
In Access 97, I tried the following code but I did not find a way to pass
the data file filein to Lindo. I can launch the application but I need to
find a way to pass the data file to lindo. Any idea how to do this? It
would be great if you could help me on this one. Thanks a lot for your
help.
Public Function myFile()
Dim RetVal
RetVal = Shell("c:\lindoind\lindo.exe", 1)
End Function