lua-users home
lua-l archive

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


Hi Jay,

look into my test.lua and require sqlite3 module as:

local sqlite = require("lsqlite3") --- first letter is small "L" letter your "require" line is missing this letter

so run lua.exe and in interpreter enter this:
> local sqlite = require("lsqlite3")

:)

> ** Thu, 4 Aug 2016 17:34:29 +0000 - "Lua mailing list" <lua-l@lists.lua.org> **
>
> Hi Pavel,
> 
> This is what I get with lua_ok.   
> C:\Users\Jay.Weinstein\Downloads\lua_ok\bin>lua.exe
> Lua 5.3.3  Copyright (C) 1994-2016 Lua.org, PUC-Rio
> > local sqlite = require("sqlite3")
> error loading module 'sqlite3' from file 'C:\Users\Jay.Weinstein\Downloads\lua_ok\bin\sqlite3.dll':
>         The specified procedure could not be found.
> 
> stack traceback:
>         [C]: in ?
>         [C]: in function 'require'
>         stdin:1: in main chunk
>         [C]: in ?
> > local sqlite = require("lsqlite3")
> > sqlite()
> stdin:1: attempt to call a nil value (global 'sqlite')
> stack traceback:
>         stdin:1: in main chunk
>         [C]: in ?
> 
>  I also ran the test.bat and I didn't notice any errors.   I also have installed lua, luarocks, and sqlite using the instructions found at https://github.com/is73/Lua-5.3-Portable-Batteries-Windows-10-32bit.
> 
> I don't have LUA_PATH, LUA_CPATH, or any LUA_.... environment parameters set.   My PATH is set as follows:
> 
> C:\ProgramData\Oracle\Java\javapath;\\leviton.inc\SysVol\leviton.inc\Policies\{174FEA63-A905-46A3-8A56-88E183EB5AD8}\Machine\Scripts\Startup;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\QuickTime\QTSystem\;O:\;C:\Program Files\TortoiseSVN\bin:C:\sqlite\sqlite-tools-win32-x86-3130000;C:\MinGW\bin:C:\"Program Files"\Java\jdk1.8.0_91\bin;C:\Program Files (x86)\7-Zip;C:\Program Files (x86)\GnuWin32\bin;C:\work\lua\bin;C:\work\luarocks
> 
> Thanks,
> Jay
> 
> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On Behalf Of Pavel Drotar
> Sent: Thursday, August 04, 2016 8:04 AM
> To: Lua mailing list
> Subject: Re: Vo veci: unable to load lsqlite3
> 
> Hi Jay,
> 
> you can try my distro
> https://github.com/is73/Lua-5.3-Portable-Batteries-Windows-10-32bit
> 
> > ** Wed, 3 Aug 2016 22:05:30 +0000 - "Lua mailing list" <lua-l@lists.lua.org> **
> >
> > Thanks, but it didn't work.  
> > 
> > Jay
> > 
> > -----Original Message-----
> > From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On Behalf Of gmc1
> > Sent: Wednesday, August 03, 2016 1:52 PM
> > To: Lua mailing list
> > Subject: Vo veci: unable to load lsqlite3
> > 
> > 
> > try lsqlite3
> > 
> > Odosielateľ 
> > 
> > "Weinstein, Jay" <Jay.Weinstein@leviton.com> napísal:
> > 
> > Hi,
> >  
> > I’m new to lua and I can’t seem to figure out how to get around the following problem.   
> >  
> > Thanks,
> > Jay
> >  
> > > local table = require("sqlite3")
> > stdin:1: module 'sqlite3' not found:
> >         no field package.preload['sqlite3']
> >         no file 'C:\Program Files (x86)\Lua\5.1\sqlite3.lua'
> >         no file 'C:\Users\Jay.Weinstein\Downloads\Binaries-LuaDist-batteries-0.9.8-Windows-x86\lib\lua\5.1\luasql'
> > stack traceback:
> >         [C]: in function 'require'
> >         stdin:1: in main chunk
> >         [C]: ? ‘C:\Users\Jay.Weinstein\Downloads\Binaries-LuaDist-batteries-0.9.8-Windows-x86\lib\lua\5.1\luasql'
> >  
> > I’ve added C:\Users\Jay.Weinstein\Downloads\Binaries-LuaDist-batteries-0.9.8-Windows-x86\lib\lua\5.1\luasql to lua_cpath and lua_path and sqlite3.dll is in thhe luasql directory.