I don\'t really understand what has happened here. I\'m using Excel VBA to connect to a SQL Server Express database and return an ADO Recordset. I had it working initially, but
I had a similar issue and found two things that killed the query results over ODBC
Count of intermediate values for processing before the final output. Fixed with "set nocount on" at the start of the query
null values being aggregated away - running the query directly on SQL Server showed the message "Warning: Null value is eliminated by an aggregate or other SET operation." Fixed by chasing down each of them and either replacing with empty strings, zeros or whatever low value makes sense and doesn't impact the query results.
I think in both cases the warning message was output before the records, so the storage recordset was 'filled' with that warning, but no data. On SQL Server, these warnings silently sit in the message log but don't impact the query results, so the temptation is to let them be and move on to higher priority work.