It's a change in VFP9 SQL ENgine which makes result of such query with aggregate funcions ANSI Standard compliant. See SET ENGINEBEHAVIOR in the help for details.
>I've just run into a serious problem with VFP9SP1 OLEDB where a simple query with only aggregate functions such as SUM(*), when run against a table with no matches to the WHERE criteria, returns an incorrect result. Instead of returning a recordset with RecordCount equal to 0, it erroneously returns a recordset with RecordCount equal to 1, and the fields in that record hold null values rather than valid numeric valuse. As you might imagine, this is a
serious error that causes the app to crash everywhere such a roll-up query is executed with no matching input records.
>
>I switched back to the VFP8 OLEDB driver dated 25/8/2003 and the problem went away.
>
--sb--