>This changes to DESCENDING order in work area B, but also in work area A!
>
>It seems to be very dangerous bug. I discover it after intensive debugging my code in case of strange behavior of my program.
>
>Best regards,
>Nikolay Petkov
This has been corrected in VFP8. Run the following code. In VFP7 and prior, both aliases are descending, in VFP8 ORDASCEND is ascending and ORDDESCEND is descending.
CLEAR
erase testtab1.dbf
create table testtab1 (f1 i, f2 C(5))
index on f1 tag f1
for i = 1 to 5
insert into testtab1 (f1) values (1)
endfor
close databases all
use testtab1 order f1 shared alias ordascend
use testtab1 again in 0 shared order f1 desc ALIAS orddescend
select ordascend
?Alias(),'is '+IIF(Descending(), 'descending', 'ascending')
select orddescend
?Alias(),'is '+IIF(Descending(), 'descending', 'ascending')
close databases all
return
Jim Saunders
Microsoft
This posting is provided “AS IS”, with no warranties, and confers no rights.