i have the following code
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);
but if there are no records returned, i simply get an exception at:
SQLDataAdapter1.Fill(dtResult1);
how do i determine if there are no records returned from this query?
I think the problem not in records returend by SqlDataAdapter because even if it’s empty it will not generate exception.
the problem in your query because email field is varchar and it should be like this: