SqlDataReader and COMPUTE clause

G

Guest

I'm working with a SqlDataReader returned by a SqlCommand.ExecuteReader()
that calls a SQL Server 2000 stored procedure that produces multiple result
sets. One of the SELECT statements in the procedure has a COMPUTE clause.

The stored procedure, when executed within SQL Query Analyzer works fine.
The second result set, which is the one with the COMPUTE clause, returns 8
rows and the third resultset with one column named SUM.

The problem is that the SqlDataReader contains zero rows for both the second
and third results. They both report false for myReader.HasRows.

When I remove the COMPUTE clause in the stored procedure, the myReader shows
as having rows for the second result.

Is this a known problem?
 
D

David Browne

WEsteban said:
I'm working with a SqlDataReader returned by a SqlCommand.ExecuteReader()
that calls a SQL Server 2000 stored procedure that produces multiple
result
sets. One of the SELECT statements in the procedure has a COMPUTE clause.

The stored procedure, when executed within SQL Query Analyzer works fine.
The second result set, which is the one with the COMPUTE clause, returns 8
rows and the third resultset with one column named SUM.

The problem is that the SqlDataReader contains zero rows for both the
second
and third results. They both report false for myReader.HasRows.

When I remove the COMPUTE clause in the stored procedure, the myReader
shows
as having rows for the second result.

Is this a known problem?


Yes COMPUTE clause is not supported.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top