开发者

Upgraded to Monotouch 4.1 Beta and get exceptions when reading SQL Lite DB

I have just upgraded to Monotouch 4.1 and all of a sudden I'm getting errors like the one at the bottom of the question when accessing my SQLite3 DB. Can anybody point me in the right direction what could be wrong here?

The code that is causing it looks like this:

using(SqliteConnection oConn = this.CreateDBMSConnection())
            {
                using ( SqliteCommand oCmd = new SqliteCommand ( "SELECT Local.*, LocalObjects.intID AS intIsPopulated FROM Locals" + " LEFT JOIN LocalData ON LocalData.intID=Local.intRootObjectID", oConn ) )
         开发者_高级运维       {
                    oConn.Open (  );
                    using ( var oReader = oCmd.ExecuteReader (  ) )
                    {
                        while ( oReader.Read (  ) )
                        {
                            Local oLocal = this.GetLocalFromReader ( oReader );
                            aLocal.Add ( oLocal );
                        }
                    }
                    oConn.Close();
                }
            }

[0xb09d6000:] EXCEPTION handling: Mono.Data.Sqlite.SqliteException: The database file is locked unable to close due to unfinalised statements

"" tid=0x0xb09d6000 this=0x0xa1ced20 thread handle 0x11f state : not waiting owns () at Mono.Data.Sqlite.SQLiteBase.CloseConnection (Mono.Data.Sqlite.SqliteConnectionHandle) [0x00029] in /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteBase.cs:212 at Mono.Data.Sqlite.SqliteConnectionHandle.ReleaseHandle () [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/UnsafeNativeMethods.cs:792 at System.Runtime.InteropServices.CriticalHandle.Dispose (bool) [0x00017] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.InteropServices/CriticalHandle.cs:51 at System.Runtime.InteropServices.CriticalHandle.Dispose () [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.InteropServices/CriticalHandle.cs:41 at Mono.Data.Sqlite.SQLite3.Close () [0x0003d] in /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs:62 at Mono.Data.Sqlite.SqliteConnection.Close () [0x0008e] in /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteConnection.cs:474

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜