Metro - Transaction bug

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
dilbert
Posts: 68
Joined: Tue 28 Apr 2009 10:11

Metro - Transaction bug

Post by dilbert » Mon 04 Mar 2013 12:05

It is unable to execute transaction with LinqConnect for Metro.

Using following code:

Code: Select all

SQLiteConnection conn = SQLiteConnection(ConnectionString)
conn.Open();
SQLiteTransaction trans = conn.BeginTransaction()

SQLiteCommand cmd = new SQLiteCommand("UPDATE t SET NAME='a' WHERE ID = 1"; conn);
cmd.CommandType = CommandType.Text;
cmd.Transaction = trans;
cmd.ExecuteNonQuery();
cmd = new SQLiteCommand("UPDATE t SET NAME='b' WHERE ID = 2"; conn);
cmd.CommandType = CommandType.Text;
cmd.Transaction = trans;
cmd.ExecuteNonQuery();
trans.Commit();
This script fails on executing "ExecuteNonQuery()" method on second query. (First statement executes correctly.) The exception message is "Unable to open database file". Looking to the folder with deployed database there are two temporary files locking the database "etilqs_*".
I've tried set different types of TransactionMode (exclusive) or IsolationLevel (read uncommited) without success. Also changing Journal_Mode to something different (e.g. TRUNCATE) doesn't help.

Also running transaction only with INSERT statement works properly. The problem occurs only if changing data (UPDATE, DELETE, REPLACE) when journal file is created.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Metro - Transaction bug

Post by MariiaI » Wed 06 Mar 2013 13:19

Could you please specify the version of LinqConnect for Metro you are working with?
There was a fix related to the "Unable to open database file" exception since LinqConnect for Metro 4.1.184.
Please try updating your version to a newer one in case you use a version older than 4.1.184.
If it is reproduced with 4.1.184 ( or with the latest 4.1.197), please send us a sample project with which this error could be reproduced so that we are able to investigate it in more details.

JIC: we couldn't reproduce it with LinqConnect for Metro 4.1.197.

dilbert
Posts: 68
Joined: Tue 28 Apr 2009 10:11

Re: Metro - Transaction bug

Post by dilbert » Wed 06 Mar 2013 16:12

I'm using the latest version (4.1.197).

I can confirm that problem I reported before version 4.1.184 is fixed and it is not related to this problem.
I sent you sample project a few minutes ago.

Thank you for your assistance.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Metro - Transaction bug

Post by MariiaI » Thu 07 Mar 2013 12:12

Thank you for the additional information and sample project. We will investigate this issue and inform you about the results as soon as possible.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Metro - Transaction bug

Post by MariiaI » Mon 20 May 2013 09:19

The bug related to the "Unable to open database file" with different variants of JournalMode in Metro style applications is fixed.
New build of LinqConnect for Metro 4.2.247 is available for download now!
It can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=27137

Post Reply