question

AnkurGupta-9055 avatar image
0 Votes"
AnkurGupta-9055 asked AnkurGupta-9055 commented

sqlite-net-pcl databale table locked issue with latest version 1.8.116

Hi, we have an xamarin.forms app using sqlit-net-pcl nuget package latest version 1.8.116 and it throws an error often "database table is locked while dropping". It does not throw any error if downgrade to package version 1.5.231. As of now we are managing deleting records with the latest nuget package but we want to drop and create table instead. Any help would be really appreciated.

Thanks
Ankur (edited)

dotnet-xamarindotnet-sqlite
· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

This issue is related to the latest sqlit-net-pcl nuget package, you can open an issue in sqlit-net-pcl Github page directly.


0 Votes 0 ·

So for now please suggest should we rollback to lower version of nuget or wait until issue resolved or any other alternative please.

Thanks
Ankur

0 Votes 0 ·

below is the stack trace we are getting,

{SQLite.SQLiteException: database table is locked
at SQLite.SQLiteCommand.ExecuteNonQuery () [0x000cd] in <01c96d411fe34bd5940c99a56515582b>:0
at SQLite.SQLiteConnection.Execute (System.String query, System.Object[] args) [0x00039] in <01c96d411fe34bd5940c99a56515582b>:0
at SQLite.SQLiteConnection.DropTable (SQLite.TableMapping map) [0x00018] in <01c96d411fe34bd5940c99a56515582b>:0
at SQLite.SQLiteConnection.DropTable[T] () [0x00012] in <01c96d411fe34bd5940c99a56515582b>:0
at SQLite.SQLiteAsyncConnection+<>c_43`1[T].<DropTableAsync>b43_0 (SQLite.SQLiteConnectionWithLock conn) [0x00000] in <01c96d411fe34bd5940c99a56515582b>:0
at SQLite.SQLiteAsyncConnection+<>c
DisplayClass33_0`1[T].<WriteAsync>b_0 () [0x00013] in <01c96d411fe34bd5940c99a56515582b>:0
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:534
at System.Threading.Tasks.Task.Execute () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319

0 Votes 0 ·

Hi LeonLu, we are facing this same issue until we downgraded to next 3 version that is - 1.2.531. Is this is also an known issue for in between version, can you please confirm.

Thanks
Ankur

0 Votes 0 ·

I cloned this official SQLite demo, sqlite-net-pcl version is 1.7.335, then I add some records in DB, after that, I update sqlite-net-pcl version to 1.8.116, Xamarin.Forms version is 5.0.0.2515, android target-framework is android 12. It is working in my side when I delete,add or update records.





0 Votes 0 ·
Show more comments

0 Answers