SqlCommand sqlCmd = new SqlCommand("select top 6 RecTime from AtdRecord where EmplID= " + dr[0].ToString() + "' and RecDate='" + dr[2].ToString() + "'", con);
con.Open();
rd = sqlCmd.ExecuteReader();
for (int i = 3; rd.Read(); i++)
{
dr[i] = rd[0];
}
con.Close();
here eror
Incorrect syntax near ' and RecDate='.
Unclosed quotation mark after the character string ''.