Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Display value in text to
Message
De
27/02/2016 06:02:33
 
 
À
26/02/2016 18:52:48
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2008 R2
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01632182
Message ID:
01632191
Vues:
56
note: noshow is in 1 word (instead "no show") and "?" dont exist in Select sql command.
in vfp you can use text/endtext to insert variables and evaluate them with textmerge and at runtime.
this is an example using Execscript() function,
local m.xfield
for i=1 to 3
do case 
case i=1
m.xfield="cust_id"
case i=2
m.xfield="company"
case i=3
m.xfield="address"
endcase

Text to m.myvar textmerge Noshow
sele < < m.xfield > >  from home(1)+"samples\data\customer" into cursor ycurs  &&cut 2spaces please in brackets
sele ycurs 
brow
Endtext
messagebox(m.myvar)
=execscript(m.myvar)
endfor
note: brackets are spaced for the ut editor only to make them visible (otherwise interpreted as HTML and rendered as this)-cut 2 spaces before running the code.
you can build a select statement with most variables between brackets (as textmerge)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform