My Gridview updation is not working.

May 1 2020 5:38 AM
I am not able to update my gridview row.
 
NOTES
 
1>My database table don't have a primary key and I will not be able to alter the table to add primary key.
 
#>I am updating the gridview as mentioned below 
    UpdateCommand = UPDATE OptumRx_Mst_Opioid_Members
    SET DOB=@dob_New,
            FName=@fName_New,  LName=@lName_New, ZIP=@zip_new
    WHERE DOB=@dob_Old AND       FName=@fName_Old AND LName=@lName_Old AND ZIP=@zip_Old 
 
2> I have kept the DataKeyName =""
4> I have used the HiddenField to store the oldValues of gridview
5> Within GridView1_RowUpdating, I am able to get the oldValues & newValues
6> I am setting updateParameter within GridView1_RowUpdating.
 
Please suggest what am I missing 
 

Answers (2)