Hi guys - i have problem with my database. I made some db in "sqlite browser" and i made table named "characters" and then i put some records. Here is lua code:
addEventHandler("onResourceStart", resourceRoot,
function()
database = dbConnect("sqlite", "projectsa.db")
local query = dbQuery( database, "SELECT * FROM characters")
outputChatBox(tostring(query))
local result, rows, msg = dbPoll(query, 0)
if result == false then
outputConsole( "dbPoll failed. Error code: " .. tostring(rows) .. " Error message: " .. tostring(msg) )
end
end)
,
but when im starting script im getting:
dbPoll failed. Error code: 1 Error message: no such table "characters"
What's wrong?
I'm sure that table is in there, and im get connection from "dbConnect" function and query from "dbQuery".