It seems that in version 1.0.81.0 and earlier the database file was released
immediately after all SQLiteConnection objects were disposed even if some
dependent SQLiteCommand and/or SQLiteDataReader objects were not yet disposed
or closed.
However starting version 1.0.82.0 the file remains locked. Consider this code:
var file = Path.GetTempFileName();
using (var connection = new SQLiteConnection("Data Source=" + file))
{
Console.WriteLine(connection.GetType().Assembly.FullName);
connection.Open();
var command = connection.CreateCommand();
command.CommandText = "CREATE TABLE t(a)";
command.ExecuteNonQuery();
}
// the following line succeeds in v1.0.81.0 and earlier but
// FAILS on v1.0.82.0 and later with "file still in use" error
File.Delete(file);
Was this change made by design?
Thanks,
- Levi
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users