Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing command line parameters
Message
From
14/11/2001 14:57:05
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00581174
Message ID:
00581725
Views:
16
>How do I pass a command line parameter to a Dos Foxpro 2.6 executable from Visual foxpro. The below code does not work.
>
>prmstartdate = date()-15
>prmenddate = date()
>! /n C:\work\acct\acct05.exe prmstartdate prmenddate
>
>Receiving program.
>
>Param prmstartdate, prmenddate
>
>
>Problem is the values in the variables are displayed as prmstartdate and not the value.

It depends what is acct05.exe expecting. If it's expecting two date strings, give it strings - i.e. do what Dave Bower said. You may need to surround them with quotes, maybe (again, depending on what it expects) like this, and may need to convert them to strings beforehand:

! /n C:\work\acct\acct05.exe "&prmstartdate" "&prmenddate"

OTOH, if it's a Fox executable, you can call it directly:

do c:\work\acct\acct05.exe with prmStartDate, prmEndDate

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform