Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening table with macro substitution for alias
Message
De
24/01/2006 06:36:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01089665
Message ID:
01089675
Vues:
13
>I am trying to open a table up a number of times dependant on how many records are in a table named vwmactionnot. The problem is it is not substituting the alias name for lncount. Any ideas waht I am doing wrong?
>
>
>lncount = 1
>DO WHILE vwmactionnot.actionno = 1
>	USE vwmmembership IN 0 ALIAS &lncount again
>	SELECT lncount
>	SET ORDER TO username
>	BROWSE NOINIT nowait
>	lncount = lncount + 1
>	SKIP
>ENDDO
>
Neil,
1) You're trying macro substitute a numeric.
2) Even if that worked alias name should be string and not a numeric
3) Even if you passed that step "select lncount" line woudl always look for an alias named 'lncount'

Suppose you wanted to have aliases like "_1", "_2", "_3" ... instead.
lncount = 1
scan WHILE vwmactionnot.actionno = 1
	USE vwmmembership IN 0 ALIAS ("_"+ltrim(str(m.lncount))) again order tag username
	SELECT ("_"+ltrim(str(m.lncount)))
	BROWSE NOINIT nowait
	lncount = m.lncount + 1
endscan
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform