I&#039;m calling a stored procedure that has a couple of result sets. The first being a count and the second being some detail data. I&#039;m trying to get the count into a variable and then use nextresult to move to the detail. This way I can write out the count and then all of the detail data. The problem that I am having is that on my first result set (the count) I get this error:<BR><BR>Exception Details: System.InvalidOperationException: Invalid attempt to read when no data is present.<BR><BR>However, when I run this stored procedure in query analyzer I do have two result sets. Has anyone had this problem or know what gives?<BR><BR>Here&#039;s my code:<BR>cmdSQL = new sqlcommand("usp_nrcprojects",db)<BR>cmdSQL.command type = commandtype.storedprocedure<BR>cmdSQL.Parameters.a dd("@status_type", strType)<BR>cmdSQL.Parameters.add("@sortorder", sortorder)<BR>cmdSQL.Parameters.add("@direction", directionsql)<BR>cmdSQL.executenonquery()<BR>rs = cmdSQL.executereader()<BR><BR>dim NSRcount<BR>NSRcount = rs("nsrcount")<BR>response.write (rs("NSRCount")) &#039;&#039;write out the count<BR>rs.nextresult() &#039;&#039;move to the detail results<BR><BR>&#039;&#039;loop through and write out the detail