Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing command line parameters
Message
De
14/11/2001 14:57:05
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00581174
Message ID:
00581725
Vues:
17
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform