i keep getting the error below
I have edit buttons, cancel buttons and ok buttons however the most important one the update button isn't working. Here is my code for the project:
i got the code from so if i understand everything right what I have is a session copy of my dataset and I am using that to manipulate my data. i am not sure why it wont update the database any help would be greatly appreciated.
To go where no programmer has gone before.
Code:
Operation must use an updateable query.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Operation must use an updateable query.
Source Error:
Line 662: adpRed.Update(MyDataSet)
I have edit buttons, cancel buttons and ok buttons however the most important one the update button isn't working. Here is my code for the project:
Code:
Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click
' Code to respond to the Click event of the UPDATE button:
' Desc: Updates the underlying database, then rebinds.
' Add error handling code as appropriate.
If DataExists() = False Then Exit Sub
adpRed.Update(DataRetrieve)
dgRed.DataSource = DataRetrieve()
dgRed.DataBind()
cmdUpdate.Visible = False
End Sub
Public Function DataRetrieve() As DataSet
Return CType(Session.Item("__Data"), DataSet)
End Function
i got the code from so if i understand everything right what I have is a session copy of my dataset and I am using that to manipulate my data. i am not sure why it wont update the database any help would be greatly appreciated.
To go where no programmer has gone before.