Steffen Mangold wrote: > > No i think i can exclude this as the problem. > Because my code goes like this: >
The test case I added for this issue is remarkably similar to your code, except it uses a different schema (the Northwind sample database) and does not re-throw the exception in the catch block (it simply writes it to the console instead). The one modification I would make to your code is explicitly opening the connection just inside the TransactionScope using block (like my test case does). Without that, the .NET Framework may try to open more than one connection to the underlying database, which could cause some problems (it did for me). For example, try this change: using (TransactionScope transaction = new TransactionScope()) //begin transaction { context.Connection.Open(); Also, keep in mind that only the rows of data that are not causing any error will be added to the database. Any rows that fail constraints will not be added. -- Joe Mistachkin _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users