I am trying to figure out how to check if my SqlDataReader is null or has no rows (meaning the reservation does not exist) and then display a messagebox. For so
SqlDataReader
Add this to your code to check:
sqlCommand cmd = new sqlCommand(); SqlDataReader dr = cmd.ExecuteReader(); if(dr.HasRows) { while(dr.Read()) { //code } }