maxout Posted November 18, 2016 Report Posted November 18, 2016 (edited) Hi Lava Citizens, I am trying to implement SQLite - update function so i can easily modify values in a selected row. http://www.sqlitetutorial.net/sqlite-update/ I have tried this statement - UPDATE ESD_User SET Name = 'James Bond', Status = 'Employee', Location = 'Canada' WHERE EmployeeID = 5; using the DB Browser for SQLite. The command does update the values as expected. I am trying to do same with the labview + sqlite driver. I have attached the update user code. I am getting an error from EXEC SQL "SQLite.lvlib:Connection.lvclass:Execute SQL (Single String).vi:760001:Step on "UPDATE ESD_User SET Name = 'James Bond', Status = 'Employee', Location = 'Canada' WHERE EmployeeID = 5;" SQLITE_BUSY: database is locked." Can you please explain the cause of this error? Thank you, max Edited November 18, 2016 by maxout Quote
drjdpowell Posted November 18, 2016 Report Posted November 18, 2016 The lock will be being caused by something else than the code being blocked, so you should post the rest of your code. Are you properly closing the “SQLite Connection” when finished with it? Leaving a transaction uncommitted? A Prepared Statement unreleased? BTW, you don’t need the BEGIN/COMMIT VIs in that code, as it’s only one SQL statement. Quote
maxout Posted December 9, 2016 Author Report Posted December 9, 2016 (edited) Hi drjdpowell, Thank you for the reply and hint. Another question is it possible to generate .db file with specific columns and tables using the wrapper you provided? Thank you, Max Edited December 9, 2016 by maxout Quote
drjdpowell Posted December 9, 2016 Report Posted December 9, 2016 8 hours ago, maxout said: Another question is it possible to generate .db file with specific columns and tables using the wrapper you provided? Tables are created using standard SQL statements. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.