Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange error
Message
De
25/12/2009 15:36:10
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01440623
Message ID:
01440649
Vues:
60
This message has been marked as a message which has helped to the initial question of the thread.
>OK naomi !
>
>Thank...
>
>but ....:-)
>
>IN Fact the problem become from a another code
>I try to build per programmation a complex sql command
>
>TEXT To oSql.cSql NOSHOW TEXTMERGE PRETEXT 15
> << m.cSql1 >>
> << m.cInner1 >>
> << oSql.ccondit1 >>
> << m.cSql2 >>
> << m.cInner2 >>
> << oSql.ccondit2 >>
>  ORDER BY 3 , 1, 4 , 2 INTO CURSOR CrystalNew READWRITE
> ENDTEXT
>
>
>&oSql.cSql

The syntax
&oSql.cSql
will probably never work, because you forgot that while the ampersnad starts the macro expansion, dot terminates it. So your macro tried to expand oSql (the part of the command which was between & and .) as a string, then append "cSql" to that string, then evaluate it as a command. Which won't work, because oSql is an object, not a string.

Generally, macro compiles whatever is between & and the next terminating character - a space or whatever; if you need the macro to be a part of the word, you need to supply your own delimiter, which is a dot:
var1="something"
x="var"
? &x.1
You simply can't execute a macro which is stored in an object's property without storing it into a variable. Even if you find a trick to do it, very few could read it. Simply...
lcSql=chrtran(oSql.csql, 0h0d0a, space(2))
&lcSQL

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform