What data type is COUNT(*) ? Maybe it's something like big int (8 byte integer) that VFP does not support. You can try to CAST it to integer(4).
You can also try the latest/different ODBC driver.
>
>
>lcSql = "SELECT substring(myField,1,3) AS myField, COUNT(*) AS totItems " +;
> " FROM myTable"+;
> " GROUP BY substr(myField,1,3)"
>
>=SQLEXEC(lnConHandle,lcSql,"myCursor")
>
>? TYPE('myCursor.totItems') -----> "C"
>
>Does anybody know why this happens and if there are any other aggregate functions which return an ummmmmmmmm "unexpected" data type?
>
>FWIW - I got a numeric value by substituting SUM(1) for COUNT(*) but I'm still curious about this.
>
>Thanks to all........Rich
--sb--