我有以下代码
string connString = ConfigurationManager.ConnectionStrings["XXXConnectionString"].ConnectionString;
SqlConnection conn = new SqlConnection(connString);
conn.Open();
SqlDataAdapter SQLDataAdapter1 = new SqlDataAdapter("SELECT * FROM EVENTSignUp WHERE (MembmerEmail = " + userInfo.Email + ")", conn);
DataTable dtResult1 = new DataTable();
SQLDataAdapter1.Fill(dtResult1);
但如果没有返回记录,我只会在以下位置出现异常:
SQLDataAdapter1.Fill(dtResult1);
我如何确定此查询是否没有返回记录?