Hello
I have four Tables in my Database that they are join to gather
I want select data from my Education_TB in the manage page of user that the user logined by username and password from Login page and redirect with Query string ID to manage page.
Now when I want show the result of select statement in a from I face to this error
"
Conversion failed when converting the nvarchar value 'Hedayatullah' to data type int.
"
Please help me what I do
Here is my Sql cod and C# cod
ALTER procedure [dbo].[Select_Education_TB_Full]
@Eid int
as
begin
select Person_Name
,Field_name_english
,SubField_Name_english
,Degree_Education
,University_Name
,Date_Graduated
,Experience_Job
,CV_Path
from Education_Degree_TB
inner join Person_TB
on Education_Degree_TB.Person_ID=Person_TB.Person_ID
join Field_TB
on Education_Degree_TB.Field_ID=Field_TB.Field_ID
join SubField_TB
on Education_Degree_TB.SubField_ID=SubField_TB.SubField_ID
where Person_Name=@Eid
end
SqlCommand cmdEdrop = new SqlCommand("Select_Education_TB_Full",con);
cmdEdrop.CommandType = CommandType.StoredProcedure;
cmdEdrop.Parameters.AddWithValue("@Eid",Request.QueryString["id"]);
con.Open();
SqlDataReader dre;
dre = cmdEdrop.ExecuteReader();
while (dre.Read())
{
LabelName.Text=dre["Person_Name"].ToString();
DropDegree.SelectedValue=dre["Field_Name_English"].ToString();
DropField.SelectedValue=dre["SubField_Name_English"].ToString();
DropQualification.SelectedValue= dre["Degree_Education"].ToString();
LabelUniversity.Text=dre["University_Name"].ToString();
LabelGraduated.Text=dre["Date_Graduated"].ToString();
DropExperience.Text=dre["Experience_Job"].ToString();
LabelCV.Text=dre["CV_Path"].ToString();
}
con.Close();