03-08-2016 10:07 AM
Hello All,
I was hoping to understand how you determine what locking state is used for opening SQLite databases. Accouding to link https://www.sqlite.org/lockingv3.html the default is "UNLOCKED"; but what is implemented in the Labview library and how is it controlled.
So using the "SQLite Example 1 -- Create Table.vi" from the examples"
1. How would I know what locking state the DB is opened in?
2. How would control /change the locking state?
3. Which locking state is best if multiple applications are sharing the DB? Unlocked?
I currently notice while running my application that another SQLite viewer has difficulity viweing the data in the DB. How can I resolve this? At least while one application is writing to the DB others should be able to view the DB; right?
Thank you for your help,
03-09-2016 06:26 PM
Hi,
What LabVIEW library are you using?
Cheers
03-10-2016 10:41 AM
I am using the Library from the NI wedsite by James Powell. I installedit using the JKI Package Manager.
03-10-2016 03:11 PM
Locking is an internal thing that you don't directly control. Make sure you aren't leaving a write-transaction open unneccessarily. You should also look into WAL mode, which allows reading while writing.
03-10-2016 03:14 PM
I was following the first example; using the Begin, Perpare, First Step and Reset to "insert" data into the DB. Where would the "WAL" be set?
03-10-2016 03:54 PM
03-10-2016 06:01 PM
This link looks to send me to a C Pragma. How would this get set for the Labview Library? Is there a VI that exposes these options. It seems it might be something that gets set during the "opening" process. But I do not see where the "journal_mode" might be. Could you suggest which I might try looking into?
Thank you so much,
03-11-2016 02:09 AM
Try scrolling to the top of the page of the link. PRAGMAs are set in SQLite by SQL statements, which you execute.
03-18-2016 02:59 PM
I have mentioned your suggestion to the team and read more of the details on the SQLite.org page. Currently the team is hesitant to let me implement the change to the journal_mode WAL. It seems this change is persistent and has an effect on “rollback”. I was also curious if it affects the “commit” well?
If I get the chance I will try and make a small test on a development DB and see what happens.
Thank you so much,