Results 1 to 2 of 2

Thread: Unable to edit data in dbase

  1. #1
    New Member
    Join Date
    Aug 12
    Posts
    6

    Unable to edit data in dbase

    Hi guys,

    I'm having an issue when i'm trying to save the modification I make in my dbase. I'm using a save button, the first save work fine but if I modify my data and try to save again I get this message: concurrency violation the updatecommand affected 0 of the expected 1 records. I get this message at the tableadapter.udapte line. I'm using visual basic express 2010. Here's my codes for my save button:

    Me.validate()
    Me.donneesoiseauxbindingsource.endedit()
    Me.donneesois_oiseauxtableadaptater.update(datatable)

    Thanks for helping me

  2. #2
    Unmoderated abhijit's Avatar
    Join Date
    Jun 99
    Location
    Chit Chat Forum.
    Posts
    3,117

    Re: Unable to edit data in dbase

    from this link:

    This is simply because DataSet (or ADO.Net rather) uses Optimistic Concurrency by default.
    This means that when updating, the whole row (rather than the changed column only) is used for comparison with the data in the database.
    This then means that if you are trying to update a row that no longer exists in the database, the update from the DataAdapter the update will fail with the exception above.

    Typical scenarios when this may happen is that you get your data into the disconnected DataSet, you do some work on it and then try the update.
    However, between you selecting the data into the client and sending the update, another user is deleting this row from his application.
    Or it can be that you are deleting the data from somewhere else in your application.


    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text File

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •