*Mário Cardia wrote:* > Solved: > > The Method Close of the Datareader was slow because it was inside a > try-catch. > I remove de try-catch and it´s ok now.
The SQLiteDataReader class, properly implementing the IDataReader interface, exposes and relies upon proper use of the IDispose interface. In general, objects exposing IDispose should be created and disposed using C# 'using' construct or its equivalent in whatever CLR-targeted language you are using. This would likely also fix your slowness issue, and would ward off other difficulties that are likely to arise in your use of these objects. You should perhaps read about IDispose and the usage patterns recommended for classes which need to implement it. Several classes in SQLite.NET, because they allocate resources needing more deterministic release than the .NET garbage collector can provide, are best used with the 'using' construct. Best regards, -- Larry Brasfield _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

