Jump to content

dbExec failed: no such table


3vo

Recommended Posts

So i ve created a script that moves string from gui edit box to server and then i want the text to be exported in sqlite database, server says there is no such a table but I see the table is there so what s the problem?

--CLIENT

function outputEditBox ( button )
    if button == "left" then
        text = guiGetText ( gui.editbox )
		triggerServerEvent ( "creatovcheek", resourceRoot, text )
    end
end

--SERVER

function listofgrid (arenaname)
    --table.insert(tablel, arenaname)
	--dbazo = exports.db:konekcja()
	local dbazo = exports.db:konekcja()
	dbExec( dbazo, "INSERT INTO areny(nazwa) VALUES (?)", arenaname)
end
addEvent( "creatovcheek", true )
addEventHandler( "creatovcheek", resourceRoot, listofgrid )

 

Link to comment

So ok, I fixed it and the reason of problem imo was I had couple of data base files with the same name "global.db" and my script loaded some other data which did not contain the table, just created own sqlite file and everything goes on.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...