Reader.NextResult() not advancing to next resultset
Posted on 2006-06-06
Reader.NextResult() not advancing to next resultset. I have a 2 resultsets in a stored proc. When I run the stored proc in Query Analyzer I get 2 tables with results, one with 10 rows the other with 1 row. When I get to reader.nextresult the .hasrows property is false. I don't know what to do to get this working. Can you assist?
SqlDataReader lReader = lCommand.ExecuteReader();
DataTable table1 = new DataTable();
DataTable table2 = new DataTable();
// read next resultset