I have a c# datareader.read method intended to read some rows from just one table in a sql server 2005 DB by means of a stored procedure.
The SP has a final select statement which provides the desired data for the read method, but it has also some other select staments inside which are executed previously to the final select statement which provides the data.
And it seems as if there are not an only result set, but some other ones, one per each select statement in the SP. And this affects the read method.
How can I hide those select statements in the SP distinct from the the final one, in such a way they don't generate result sets which are undesirably readed by the read method?
Thanks in advance,