2
Answers

Must Declare Scalar variable "@photo"

shamim khan

shamim khan

11y
1.7k
1
Hi..

sir have used the code from your Artical(

Inserting & Retrieving Images from SQL Server Database without using Stored Procedures)..

without any changes..

But sir it works for My Insert Query

"insert into Student values('" + txtStudentReg.Text.ToString() + "','" + txtStudentName.Text.ToString() + "',@photo,'" + comboDescipId.SelectedItem.ToString() + "','" + txtFatherName.Text + "')";

But Does't Work for My Update Query

 "Update  Student set StudentName='" + txtstdName.Text.ToString() + "', StudentImage=@photo, DescipId='" + comboDescipline.SelectedItem.ToString() + "', FatherName='" + txtFatherName.Text + "' where StudentRegNo='" + txtStdRegno.Text + "'";

StudentImage is my table field in Student Table of type Image....

please Please Sir Help me..... I need it Urgently...

Thanks in advance

Answers (2)