hiii, i am using asp.net 2005 and sql server 2005...i hav a page in which i have used gridview ant sql data source..
i have written the update command for the same..the problem is when i add the where clause in the query i get an error ,,,,here is the code
UpdateCommand="UPDATE SMEtre_Master SET FirstName =@FirstName, LastName =@LastName, Type_of_SME =@Type_of_SME, Agency_Name =@Agency_Name, Email =@Email, Address =@Address, Phone =@Phone, Mobile =@Mobile, Fax =@Fax, Experience =@Experience, City =@City, State =@State where SME_Id=@SME_Id"
the error i get is:::
Exception Details: System.Data.SqlClient.SqlException: Must declare the scalar variable "@SME_Id".
if i remove the where clause and the i update the whole column gets updated....
can ne1 help me,,,,,hope u understood my prob....pls reply,,its urgent
thnks in advance