not sure if I quite follow
if there are no results returned, then you can check to see if the dataReader.HasRows - which indicates if the results in the "buffer" contains any records (rows) and if they do, results exist then go through them the way you want and handle it.
Any exceptions thrown by SQL will be thrown in the SqlException with details of the error.
Are you also able to post your SQL Query
|