Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scan with NO code, what does it do?
Message
From
07/05/2003 02:33:28
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/05/2003 16:38:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00785588
Message ID:
00785674
Views:
24
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform