Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro substitution
Message
De
27/09/1999 16:01:58
 
 
À
27/09/1999 15:56:45
Paul Robinshaw
Silkworm Technologies Limited
Macclesfield, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00269596
Message ID:
00269602
Vues:
24
Hi Paul,

It's splitting the line, probably, because you have some hard returns in the memo fields. Try using STRTRAN(memofield,CHR(13)," ") to replace them with spaces instead of just memofield.

Also, a point of personal preference: I'd use UPDATE &cUpdParms rather than &lcWholeCommand.


>Hi All,
>
>I'm having an uphill battle with a command that is macro substituted.
>
>It's an UPDATE table SET var=1 command. I'm doing something like
>
>lcWholeCommand = "UPDATE table SET var=1"
>&lcWholeCommand
>
>Now, the command is quite large and certainly exceeds 1000 characters. According to the help files this isn't a problem as VFP and handle commands that are 8192 characters long.
>
>However, the macro substitution fails with a "commnad contains unrecognised phrase or keyword"
>
>If, when my program has crashed I copy the lcWholeCommand to _CLIPTEXT and paste it into the command window, I get something really odd, Fox splits the command across two lines. If I execute the command with a semi colon between the two lines everything's ok.
>
>BTW some of the var= parts of the command include memo fields which is why the command is so long.
>
>Hope this makes sense.
>
>Best wishes
>
>Paul Robinshaw
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform