lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I think you're right.. I had both open in separate tabs and got them confused.

2013/3/27 Gyepi SAM <self-lua@gyepi.com>:
> On Wed, Mar 27, 2013 at 01:30:36AM +0100, Christian Bielert wrote:
>> downloaded the windows binary release from
>> http://lua.sqlite.org/index.cgi/index. I unpacked luasql/sqlite3.dll
>> into the directory with my lua files and called the lua interpreter to
>> try out the functionality outlined in the documentation(e.g.
>> "sqlite3.open(filename)")
>>
>> > require "stdlib"
>> > require "luasql.sqlite3"
>> > pprint(luasql)
>> {sqlite3 = 'function: 0062B810', _VERSION = 'LuaSQL 2.1.0', _DESCRIPTION = 'LuaS
>> QL is a simple interface from Lua to a DBMS', _COPYRIGHT = 'Copyright (C) 2003-2
>> 007 Kepler Project}
>>
>> Okay, so the only thing I can do at all is call luasql.sqlite3()?
>> Let's try that.
>>
>> > result = luasql.sqlite3()
>> > =result
>> SQLite3 environment (0062D290)
>> > =type(result)
>> userdata
>> > result.open("foo")
>> Error: stdin:1: attempt to call field 'open' (a nil value)
>> [1] open
>> [2] Unknown
>> [3] Unknown
>>
>> Alright, yeah, I'm stuck. Does this mean the official binary release
>> is somehow broken, or is there simply something that isn't documented?
>
> I think there's been some confusion; I think you are using the sqlite driver
> from the Kepler project, but reading the documentation for the driver from
> http://lua.sqlite.org/index.cgi/index.
>
> If you choose to use the Kepler version, you'll want to say
>
>     conn = result.connect("foo")
>
> instead and go from there.
>
> -Gyepi
>