Hello,

 

I recently updated my project to use the latest version of
System.Data.SQLite (1.0.82.0). But it seems that there is a bug in this
version. After I open an sqllite database and perform any query, the
database stays locked until the process ends.

 

Here is a C# code sample to reproduce the problem:

 

 

            using (var conn = new SQLiteConnection("Data Source=alex.db"))

            {

                conn.Open();

                var cmd = conn.CreateCommand();

                cmd.CommandText = "select 1;";

                cmd.ExecuteScalar();

                conn.Close();

            }

            GC.Collect(2,GCCollectionMode.Forced);

            File.Delete("alex.db");

 

When running this sample with System.Data.SQLite.dll v1.0.81 everything
works ok.

When running this sample with System.Data.SQLite.dll v1.0.82, it fails on
File.Delete line with IOException: The process cannot access the file
'alex.db' because it is being used by another process.

 

Can you help me to fix this problem?

 

Alex Reitbort

Software Developer

Skyline Software Systems Inc.

www.skylineglobe.com

 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to