Page 1 of 1

Metro - Transaction bug

Posted: Mon 04 Mar 2013 12:05
by dilbert
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.

Re: Metro - Transaction bug

Posted: Wed 06 Mar 2013 13:19
by MariiaI
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.

Re: Metro - Transaction bug

Posted: Wed 06 Mar 2013 16:12
by dilbert
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.

Re: Metro - Transaction bug

Posted: Thu 07 Mar 2013 12:12
by MariiaI
Thank you for the additional information and sample project. We will investigate this issue and inform you about the results as soon as possible.

Re: Metro - Transaction bug

Posted: Mon 20 May 2013 09:19
by MariiaI
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