CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2006
    Posts
    449

    ERROR: Concurrency violation!

    Am working in VS2005/SQL/VB/Windowsapp.

    I first developed a windowsapp with SQL with DB in Net Server but now am coverting the same windowsapp with the local database with MS-Access. I have changed all the connection string and all SQL related statements to OleDB wherever necessary. Now the application is working fine and I could able to submit the forms and store it in local DB but the PROBLEM is when I try to edit/update I get this error:

    "DBConcurrencyException was unhandled -
    Concurrency violation: the UpdateCommand affected 0 of the expected 1 records."

    And the breakpoint error line is: adapter.Update(dt)

    Where could be the problem? PLease guide/help me. Thank you.

  2. #2
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    1,080

    Re: ERROR: Concurrency violation!

    A concurrency violation occurs when the original version of the data stored in your app doesn't match the data in the database when you try to save your changes. Anything that could cause that situation to arise could be the problem. Either changes are being made to the database from another source between when you get the data and when you save it, or else you're messing up your data in your app.
    Tutorials: Home & Learn | Start VB.NET | Learn VB.NET | C# Station | GotDotNet | Games in VB.NET 101 Samples: 2002 | 2003 | 2005 | More .NET 2.0 (VB.NET, C#) Articles: VB.NET | C# | ASP.NET | MoreFree Components: WFC | XPCC | ElementsEx | VBPP | Mentalis | ADO.NET/MySQL | VisualStyles | Charting (NPlot, ZedGraph) | iTextSharp (PDF) | SDF (CF) ● Free Literature: VB 2005 (eBook) | VB6 to VB.NET (eBook) | MSDN Magazine (CHM format) ● Bookmarks: MSDN | WinForms .NET | ASP.NET | WinForms FAQ | WebForms FAQ | GotDotNet | Code Project | DevBuzz (CF) ● Code Converter: C#/VB.NET | VB.NET/C# | VS 2005 add-in

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured