Note that there are some explanatory texts on larger screens.

plurals
  1. POConcurrency violation while updating and deleting newly added rows
    primarykey
    data
    text
    <p>I've been developing a CRUD application using <strong>Datasets</strong> in C# and Sql Server 2012. The project is basically an agenda wich holds information about Pokémon (name, habilities, types, image, etc). By the few months I've been facing a problem related to <strong>concurrency violation</strong>. In other words, when I try to delete or update rows that I've just added during the same execution of the program, the concurrency exception is generated and it isn't possible to perform any other changes in the database. So I need to restart the program in order to be able to perform the changes again (<strong>Important Note: this exception only happens for the new rows added through C#)</strong>. I've been looking for a solution for this violation <strong>(without using Entity Framework or LINQ to SQL)</strong>, but I couldn't find anything that I could add in the C#'s source code. Does anyone knows how to handle this? What should I implement in my source code? Is there anything to do in SQL Server that could help on it?</p> <p>Here is a link to my project, a backup from the database, images of the main form and the database diagram:</p> <p><a href="http://www.mediafire.com/download.php?izkat44a0e4q8em" rel="nofollow">http://www.mediafire.com/download.php?izkat44a0e4q8em</a> (C# source code)</p> <p><a href="http://www.mediafire.com/download.php?rj2e118pliarae2" rel="nofollow">http://www.mediafire.com/download.php?rj2e118pliarae2</a> (Sql backup)</p> <p>imageshack .us /a /img 708/38 23/pokmonform .png (Main Form)</p> <p>imageshack .us /a /img 18/95 46/kantopokdexdiagram .png (Database Diagram)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload