System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection("server=localhost;database=northWind;uid=sa;password=110");
conn.Open();
System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter("select name,prd from password",conn);
dt = new System.Data.DataSet();
da.Fill(dt,"password");
if ((this.tx.Text == dt.Tables[0].rows[0][0]) && (this.tx.Text == dt.Tables[0].rows[0][1]))
{
 MessageBox.Show("right");
}
else
{
 MessageBox.Show("Erro ");
}