Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why?
Message
From
16/06/2009 06:38:53
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
16/06/2009 06:26:48
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Why?
Miscellaneous
Thread ID:
01406283
Message ID:
01406287
Views:
94
Hi Gregory,

I do not think that the problem is the order. It will cure the problem to the first, yes.

But DISPLAY .. FOR .. will not order the result, it will display the records in the order they are stored.
So the ascending list
>>0001
>>0002
>>0045
>>0046
comes out of coincedence, not of a preset order.

He need a SCAN FOR ... instead of SCAN WHILE ..., and he can delete the SEEK.

Agnes

>In the second example you have to set the order to inv
>
>
> use sales in 0 alias sales order inv
>
>>select sales
>>mkey='003333'
>
> seek mkey
>
>>scan while inv=mkey
>>    disp PK
>>endscan
>>use in sales
>
>
>
>
>>I wonder why these two codes show difference results:
>>
>>
>>use sales in 0 alias sales
>>select sales
>>mkey='003333'
>>disp PK for inv=mkey
>>use in sales
>>
>>
>>result:
>>--------
>>0001
>>0002
>>0045
>>0046
>>
>>
>>use sales in 0 alias sales
>>select sales
>>mkey='003333'
>>seek mkey order inv
>>scan while inv=mkey
>>    disp PK
>>endscan
>>use in sales
>>
>>
>>result:
>>-------
>>0001
>>0002
>>
>>
>>thanks for the help
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform