Not sure why it would ever work. I've never seen distinct written as a function the way you have, rather then as a keyword, like order by
>This line of code works in VFP 7 but causes an error in VFP 9. What's the problem?
>
>select distinct(make) as make from car_type into cursor ccar_type order by make
>
>The error is 1808 - Message= SQL: ORDER BY clause is invalid.
>
>Calvin
(On an infant's shirt): Already smarter than Bush