Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scan with NO code, what does it do?
Message
De
07/05/2003 02:33:28
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/05/2003 16:38:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00785588
Message ID:
00785674
Vues:
23
>While checking forms for other problems I found the following code
>
>SELECT vitems
>
>cOldOrder = ORDER()
>SET ORDER TO TAG ordkey
>
>SEEK Order_List.cordno
>
>SCAN WHILE vitems.clordno = Order_List.cordno
>ENDSCAN
>
>What does it do?

Moves the pointer to record where clordno is the following key of order_list.cordno in a slow way (thinking there might be many records with a particular key). ie: If there are clordno keys like 5 and 6 and current order_list.cordno is 5, moves pointer to first key with clordno=6 in vitems.
(Code seems to assume Order_List.cordno exists in vitems)
SELECT vitems
cOldOrder = ORDER()
SET ORDER TO TAG ordkey

* Sounds to be a char key
lcKey = Stuff(Order_List.cordno, ;
  Len(Order_List.cordno), 1, ;
  Chr(Asc(Right(Order_List.cordno,1))+1))
* If integer: lnKey = lnKey + 1
set near on
SEEK lcKey
set near off
or
SELECT vitems

cOldOrder = ORDER()
SET ORDER TO TAG ordkey desc
*set near on && If key might not exist
SEEK Order_List.cordno
*set near off
SET ORDER TO TAG ordkey ascending
skip
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform