System.Data.SQLite
Ticket Change Details
Not logged in
Overview

Artifact ID: 5683d82b91bf702badb2870ca0275d5125f2540c
Ticket: ccfa69fc3251fb3512e9f17eca7a4c8fab6302e1
Transaction on conflict behave
User & Date: mistachkin 2011-09-11 15:37:19
Changes

  1. Change comment to:

    When a transaction is running and an error occurs, ON CONFLICT clause not running default. For example when a transaction with 100 rows (inserts) is executed and row 50 raise a contraint exception, all rows above will not be executed.

    SQLITE doku writes that "but changes caused by prior SQL statements within the same transaction are preserved and the transaction remains active".


    mistachkin added on 2011-09-11 13:09:52 UTC:
    This issue seems to involve the .NET Entity Framework and I am not an expert on that package; however, it seems that the TransactionScope class is normally unnecessary unless you have changes that span multiple object contexts (e.g. multiple SQLite databases), see:

    http://stackoverflow.com/questions/794707/why-doesnt-transactionscope-work-with-entity-framework


    mistachkin added on 2011-09-11 13:40:00 UTC:
    Related: http://msdn.microsoft.com/en-us/library/bb738523.aspx


    mistachkin added on 2011-09-11 13:42:27 UTC:
    Also, there seems to be a problem with the SQLiteConnection.EnlistTransaction method that prevents TransactionScope from working with an ObjectContext if the code involved tries to access the database more than once from inside the same transaction.


    mistachkin added on 2011-09-11 15:36:54 UTC:
    An experimental fix for this issue is available in check-in [f4e1038098], with unit tests.

    Would it be possible for you to test this fix in your environment and report back with the outcome of your testing?

  2. Change subsystem to "Connection"