lua-users home
lua-l archive

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


Hello

I am trying to use the luasql to connect to a mysql through ODBC.
I get an ASSERT at line 163 of ls_odbc.c 

reeswitch1 scripts # lua luatest.lua 
lua: src/ls_odbc.c:163: sqltypetolua: Assertion `0' failed.
Aborted

In what there can be a reason of such error?
Please help me solve this issue.

--------------
freeswitch1 scripts # uname -a
Linux freeswitch1 2.6.32-gentoo-r7 #1 SMP Mon Jun 7 16:04:03 MSD 2010 i686 Pentium(R) Dual-Core CPU E6500 @ 2.93GHz GenuineIntel GNU/Linux

My simple script:

require "luasql.odbc"

env = assert(luasql.odbc())
con = assert (env:connect("conf_odbc","user","pass"))
cur = assert(con:execute("SELECT * FROM tg where username = 'name1';"))
row = cur:fetch({}, "a")

if row == nil then
print("rez1")
else
print(row.def_cli)
end

cur:close()
con:close()
env:close()


P.S. The problem consists not in a script (on other server script work)