Environment versions
Network:
Windows 2003 Server
>>>>I can't go to 9 because it would be too much work. But I would like to get more stability and take advantage of some additional features that may be in a new OS.
>>>>
>>>>(The number of support calls I get have gone up as clients upgrade their OS and infrastructure.)
>>>
>>>The issue I have seen bite people (including me!) in VFP 9 is that by default you now get a runtime error from improper GROUP BY clauses in SQL SELECT statements. In a nutshell, all the output columns need to be aggregates. Otherwise you will get the value from a random record. VFP used to allow that and now it doesn't. From a data perspective this is correct. However, it did break a lot of sloppy code.
>>>
>>>But wait, there is good news. As Naomi indicates, there is a SET ENGINEBEHAVIOR command that lets you override the default behavior. You can issue this early in your application:
>>>
>>>SET ENGINEBEHAVIOR 80 && version 8.0
>>>
>>>The cleaner way is to fix the fishy GROUP BYs. As you say, though, you don't always have the luxury of having the time to do it. It's literally a one line change and your code will work just like it did before. There are a few other issues going from 6 to 9 but in my experience this tends to be the one that bites you.
>>
>>You would need to set it to 70, not 80. In any case, looks like George has other problems, not related with GROUP BY problem.
>
>Right you are. My mistake.
Also, not to be too picky, but I don't think you really meant that "all the output columns need to be aggregates". I know what you meant, but for the record, aggregates are the only ones that do not need to be grouped.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only