Hi Naser,
From your updated question, you retrieved only one string and moved to FirstActivityTxt.text,
you missed to read second string... so try this
SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=Joining ;Persist Security Info=True;User ID=sa;Password=*********");
string Query = "SELECT * FROM ActivityTBL WHERE Output_ID = '"+Outputcmbx.Text+"';".ToString();
SqlCommand cmd = new SqlCommand(Query, conn);
SqlDataReader dr;
try
{
conn.Open();
dr = cmd.ExecuteReader();
while (dr.Read())
{
string sActivity = dr.GetString(2);
string poorActivity = dr.GetString(1);
FirstActivitytxt.Text = sActivity;
PoorActivitytxt.Text = poorActivity;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
I think now it would work....
Regards,
RK