Showing posts with label resultsets. Show all posts
Showing posts with label resultsets. Show all posts

Friday, March 9, 2012

Problem with empty resultsets from SQL 2005 and RDO

We have an application written in VB6 using RDO that we're trying to migrate to SQL 2005 from 2000. We've encountered a problem where a stored procedure returns a resultset and calls another stored procedure that returns another resultset. If the second resultset does not contain any rows and the second stored procedure generates a warning message ("Warning: Null value is eliminated by an aggregate or other SET operation."), the MoreResults method fails in trying to access the second resultset.

If the second resultset is not empty or I modify the stored procedure to eliminate the warning message, then I am able to access the second resultset. The exact same code works against a SQL 2000 server with identical stored procedures and data, regardless of the the resutlset being empty or the warning message being generated. I can also execute the stored procedure calls from Query Analyzer and the results look identical in SQL 2000 and 2005, but somehow there's something different in how RDO sees the results.

Has anyone else seen this problem or have I missed something? SET ANSI_WARNINGS OFF would eliminate the message, but we use indexed views, which requires ANSI_WARNINGS ON.

Can you provide us with sample repro code for this issue?

Thanks
Suroor