JDP Science Tools

cancel
Showing results for 
Search instead for 
Did you mean: 

Reset "SQLITE_BUSY(5): database is locked"

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

0 Kudos
Message 1 of 4
(185 Views)

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...

Message 2 of 4
(174 Views)

Thanks! I have kudosed it now.

0 Kudos
Message 3 of 4
(159 Views)

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.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 4 of 4
(133 Views)