Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem updateing database

Status
Not open for further replies.

dbsquared

Programmer
Nov 7, 2002
175
US
i keep getting the error below in the ASP .Net forum I got a response that it is an access issue I was hoping someone in here could help me with fixing access to accept my update. Thanks

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top