06-23-2025 01:34 AM
Hi,
Sometimes when developing and debugging, the execution of my Labview app is aborted during an ongoing Sqlite transaction. Then, when I try to run my app again, I get the error "SQLITE_BUSY(5): database is locked", see below. SqliteStudio cannot access my database, either. The only way I can get it to work and getting access to the DB again is to close and restart the Labview development environment. It seems like the underlying DLL is still holding the resource, or something like that. Is there a simpler, smarter way to get out of this lock situation?
B.R. Andreas Nilsson
----
Error 402864 occurred at SQLite.lvlib:Connection.lvclass:Execute Single SQL Statement (UTF-8).vi:6270001:Step
SQL--> "BEGIN IMMEDIATE"
MAIN db name-->"C:\Labview-utv\kontrolldata.sqlite3"
SQLITE_BUSY(5): database is locked
06-23-2025 02:26 AM
Unfortunately there is no way around it except restart LabVIEW. Please kudos this idea that would let me fix this: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Means-to-register-a-DVR-cleanup-callback-fior-use-whe...
06-23-2025 03:45 AM
Thanks! I have kudosed it now.
06-23-2025 05:13 PM
I think it's possible to unload a dll. If you've programmatically called the dll by path and not used a statically defined path, I think you can unload that dll by calling the CFLN with a blank path. Might be wrong, this isn't something I'm certain about nor am I sure whether it helps here, but thought I'd mention it in case it's useful info.