SqlDataReader and COMPUTE clause

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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
 
Back
Top