mercea
09-10-2007, 04:54 PM
hi all,
i have created a gridview with the select,delete and insert commands working properly. but the update command does not work. when i edit a column and click the update button, it generates no errors but does not save the changes. it just brings back the original values. i dont know wats missing. can anyone help me?
this is part of my code:
UpdateCommand="UPDATE [test101] SET Surname=@Surname,Names=@Names,Registration=@Registration, [Course code]=@Course_code,Grade=@Grade WHERE ID=@ID1 "
<UpdateParameters>
<asp:Parameter Name="Surname" Type=String />
<asp:Parameter Name="Names" Type=String />
<asp:Parameter Name="Registration" Type=String />
<asp:Parameter Name="Course_code" Type=String />
<asp:Parameter Name="Grade" Type=Int32 />
<asp:Parameter Name="ID1" Type=Int32 />
</UpdateParameters>
i have created a gridview with the select,delete and insert commands working properly. but the update command does not work. when i edit a column and click the update button, it generates no errors but does not save the changes. it just brings back the original values. i dont know wats missing. can anyone help me?
this is part of my code:
UpdateCommand="UPDATE [test101] SET Surname=@Surname,Names=@Names,Registration=@Registration, [Course code]=@Course_code,Grade=@Grade WHERE ID=@ID1 "
<UpdateParameters>
<asp:Parameter Name="Surname" Type=String />
<asp:Parameter Name="Names" Type=String />
<asp:Parameter Name="Registration" Type=String />
<asp:Parameter Name="Course_code" Type=String />
<asp:Parameter Name="Grade" Type=Int32 />
<asp:Parameter Name="ID1" Type=Int32 />
</UpdateParameters>