On Wed, Sep 26, 2012 at 12:15 PM, g.lister <g.lister@nodeunit.com> wrote:
Hi guys,
I would like to know what is the best library to use with Lua for SQLite 3.
I have installed LuaSQL on my Ubuntu 12.10 and I am having some issues:
ua: system.lua:56: LuaSQL: file is encrypted or is not a database
stack traceback:
[C]: in function 'assert'
system.lua:56: in main chunk
[C]: ?
from this:
assert(conn:execute("select * from users"))
when I check the version:
gs@flipper:~/Lua/mystuff$ file test.db
test.db: SQLite 2.x database
I am thinking it is something really simple since I am a newbie, like the
version of the db is different from the one in LuaSQL but cannot dig it out
in the docs: http://www.keplerproject.org/luasql/ What version is supported
by the driver I mean.
Also I'm a bit confused as to what version is actually used on my system as
I think the CLI client has it is own version:
gs@flipper:~/Lua/mystuff$ sqlite -version
2.8.17
But the package manager thingy reports 3.
Is the lua-sqlite3 library the preferred way? or is it in fact the same as
the front end in the docs mentions that such an interface is provided in
addition to the full functions SQLite specific one.
What do you guys use?
TIA
George