Re: [sqlite] Change in behavior between 1.0.79.0 and 1.0.83.0 inSystem.Data.SQLite
One further follow-up. I tested all the other versions in between. The break happened between 1.0.81.0 and 1.0.82.0 -- Michael Russell MTI Film, LLC michael.russ...@mtifilm.com http://www.mtifilm.com/ Providence, RI 02906 USA +1 (401) 831-1315 On Wed, Jan 9, 2013 at 10:47 AM, Michael Russell < michael.russ...@mtifilm.com> wrote: > I have narrowed this down and to just the System.Data.SQLite.DLL. I have > a test project in VS2010 with .NET 4.0. If I only change the > System.Data.SQLite.DLL from 1.0.79.0 to 1.0.83.0 I get the failure that the > file is open. I am not changing any other components or DLL's. > > > -- > Michael Russell > MTI Film, LLC > michael.russ...@mtifilm.com > http://www.mtifilm.com/ > Providence, RI 02906 USA > +1 (401) 831-1315 > > > On Tue, Jan 8, 2013 at 2:12 PM, Joe Mistachkinwrote: > >> >> Michael Russell wrote: >> > >> > The File.Delete() fails with the same issue as above >> (System.IO.Exception: >> > The process cannot access the file...because it is being used by another >> > process.) >> > >> >> My guess would be that the Entity Framework is somehow holding the >> underlying >> connection open. I'm not sure if there is a way to force it to close the >> connection and/or dispose of the other System.Data.SQLite resources it's >> using. >> >> -- >> Joe Mistachkin >> >> ___ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Change in behavior between 1.0.79.0 and 1.0.83.0 inSystem.Data.SQLite
I have narrowed this down and to just the System.Data.SQLite.DLL. I have a test project in VS2010 with .NET 4.0. If I only change the System.Data.SQLite.DLL from 1.0.79.0 to 1.0.83.0 I get the failure that the file is open. I am not changing any other components or DLL's. -- Michael Russell MTI Film, LLC michael.russ...@mtifilm.com http://www.mtifilm.com/ Providence, RI 02906 USA +1 (401) 831-1315 On Tue, Jan 8, 2013 at 2:12 PM, Joe Mistachkinwrote: > > Michael Russell wrote: > > > > The File.Delete() fails with the same issue as above > (System.IO.Exception: > > The process cannot access the file...because it is being used by another > > process.) > > > > My guess would be that the Entity Framework is somehow holding the > underlying > connection open. I'm not sure if there is a way to force it to close the > connection and/or dispose of the other System.Data.SQLite resources it's > using. > > -- > Joe Mistachkin > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Change in behavior between 1.0.79.0 and 1.0.83.0 inSystem.Data.SQLite
Michael Russell wrote: > > The File.Delete() fails with the same issue as above (System.IO.Exception: > The process cannot access the file...because it is being used by another > process.) > My guess would be that the Entity Framework is somehow holding the underlying connection open. I'm not sure if there is a way to force it to close the connection and/or dispose of the other System.Data.SQLite resources it's using. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Change in behavior between 1.0.79.0 and 1.0.83.0 inSystem.Data.SQLite
Michael Russell wrote: > > We were previously using 1.0.79.0, but in an attempt to move to VS2012 / > .NET 4.5 I started doing some testing with 1.0.83.0. I found that many of > our UnitTests now fail when they try to delete the temporary test database > file they created. This happens with the SQLiteConnection() call. I can > provide a complete VS project, but here's a code snippet that has the > crucial parts: > The change was to keep the underlying native connection open until all other native objects that refer to it have been disposed. > > var sqlCommand = new SQLiteCommand(connection) > { > CommandText = "SELECT * from User where Username='administrator'" > }; > If you make sure and dispose of all SQLiteCommand and SQLiteDataReader objects associated with a particular connection, you should not see any issue. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users