Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COPY TO .... up to current record?
Message
De
11/03/2005 09:15:24
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
11/03/2005 08:34:11
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
Divers
Thread ID:
00994688
Message ID:
00994792
Vues:
30
>Tore --
>
>Unfortunately, neither of your suggestions are usable. The first fails because the table is ordered, so the record numbers appear to be random. The second fails for the same reason as well as because the table is filtered.

So then there is a key... and maybe a filter. How about this (had to use {{ and }} for text delimiters):
cOrder=key()
private uCurrent
uCurrent=eval(cOrder)
cFilter=filter()
if !empty(cFilter)
   cFilter=" and " +cFilter
endif
TEXT TO c NOSHOW TEXTMERGE
select * from TheTable where {{cOrder}}<=uCurrent {{cFilter}};
	into cursor tmp
ENDTEXT
=execscript(c)
With the filter there's an odd chance that the expression may include something that wouldn't work in a sql statement - in that case, this would have to be a "copy to ... for {{cOrder}}<=uCurrent {{cFilter}}"
There's

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