I have problem with this code and I don't know why that is.
Code:
SqlConnection getconn = new SqlConnection(somthing secured);
string sql = "select pk_stu_id , stu_name from MRK , STU , LSN where fk_stu_id = pk_stu_id and fk_lsn_id = pk_lsn_id AND pk_lsn_id="
+ int.Parse(textBoxSearchStudentID.Text)
+ " and pk_stu_id="
+ int.Parse(textBoxSearchLessonID.Text);
SqlCommand cmd = new SqlCommand(sql, getconn);
getconn.Open();
SqlDataReader result = cmd.ExecuteReader();
while (result.Read())
{
textBoxDataSend.Text = string.Empty;
textBoxDataSend.Text = result.ToString();
}
getconn.Close();
But it just always returns: "System.Data.SqlClient.SqlDataReader".
Does anyone know how to fix this?