string str = textBox1.Text;
SqlConnection mycon = getConnection();
mycon.Open();
string sql = "select * from customers where joinid='" + textBox1.Text + "'";
SqlCommand mycom = new SqlCommand(sql, mycon);
SqlDataReader mydr = mycom.ExecuteReader();
if (mydr.Read())
{
}