• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Problem - database is locked (1 Viewer)

Joined
May 30, 2015
RedCents
220¢
Trying to use lsqlite3 every now and then I get a "database is locked".

INI:
local SQL = require('lsqlite3')
local DB = SQL.open(cooldb)


if DB:isopen() then
     local MeQ = "SELECT * FROM Dets WHERE Name = '" .. MyName .. "'"
     for X in DB:urows(MeQ) do
          HaveRow = true
          DBDet = X.DetStat
          break
     end
end

is there anything I can do to either 1, prevent it from locking, or 2 check and see if it is locked before continuing on?

Thanks for the help!
 
Trying to use lsqlite3 every now and then I get a "database is locked".

INI:
local SQL = require('lsqlite3')
local DB = SQL.open(cooldb)


if DB:isopen() then
     local MeQ = "SELECT * FROM Dets WHERE Name = '" .. MyName .. "'"
     for X in DB:urows(MeQ) do
          HaveRow = true
          DBDet = X.DetStat
          break
     end
end

is there anything I can do to either 1, prevent it from locking, or 2 check and see if it is locked before continuing on?

Thanks for the help!
Do you have multiple scripts trying to access the same database? Multiple characters running the same script trying to do so?

INI:
local dbn = sqlite3.open(mq.luaDir .. '\\epiclaziness\\epiclaziness.db')

    local sql = "SELECT * FROM " .. tablename
    for a in dbn:nrows(sql) do
        table.insert(task_table, a)
    end

is what I use with lsqlite3 and have had no issues
 
Do you have multiple scripts trying to access the same database? Multiple characters running the same script trying to do so?

INI:
local dbn = sqlite3.open(mq.luaDir .. '\\epiclaziness\\epiclaziness.db')

    local sql = "SELECT * FROM " .. tablename
    for a in dbn:nrows(sql) do
        table.insert(task_table, a)
    end

is what I use with lsqlite3 and have had no issues
Yes, mulitple scripts trying to open the same DB with the same script.

Tried using numros instead of urows.. was getting the same thing.

wierd.. wonder where i am screwing it up lol.. been kicking my @#$
 
Yes, mulitple scripts trying to open the same DB with the same script.

Tried using numros instead of urows.. was getting the same thing.

wierd.. wonder where i am screwing it up lol.. been kicking my @#$

I've not played with having multiple things accessing the database at once. Best I can offer is to throw you this link: https://sqldocs.org/sqlite/sqlite-database-is-locked/
Hopefully someone else can help you a bit more!
 
Problem - database is locked

Users who are viewing this thread

Back
Top