Your problem is going to be here:
while (s.Read())
{
if (toolStripTextBox1.Text != s["cm"].ToString())
{
s.Close();
MessageBox.Show("Please check the name");
}
}
You're closing the connection inside the loop that is trying to read from the connection.