Posted on: 10/15/2012 2:06:56 AM | Views : 326

I have a buttonSave where I want user to edit some textboxes and click save to update a sql server database using the code below. For same reasons the update is not working.After clicking update button the textboxes does change and the database also doesn't reflect the changes.
NewcmdUpdateEmp = New SqlCommand("UPDATE tblSuggestions SET SupvrFName=@Supvr_FName,SupvrLName=@Supvr_LName,Supvrlsignature=@Supvrl_signature WHERE SuggID =" + QueryStringSuggID, Newconn) NewcmdUpdateEmp.Parameters.Add("@SupvrFName", Data.SqlDbType.NVarChar, 50) NewcmdUpdateEmp.Parameters.Add("@SupvrLName", Data.SqlDbType.Int) NewcmdUpdateEmp.Parameters.Add("@Supvrlsignature", Data.SqlDbType.Int) NewcmdUpdateEmp.Parameters("@SupvrFName").Value = CType(btSubmits.FindControl("supvr_fname"), TextBox).Text NewcmdUpdateEmp.Parameters("@SupvrLName").Value = CType(btSubmits.FindControl("supvr_lname"), TextBox).Text NewcmdUpdateEmp.Par ...

Go to the complete details ...