lua-users home
lua-l archive

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


the following code:
XXXXXXXXXXXXXX
require('DBI')

-- Create a connection
local dbh = assert(DBI.Connect('Driver', db, username, password, host, port))

-- set the autocommit flag
-- this is turned off by default
dbh:autocommit(true)

-- check status of the connection
local alive = dbh:ping()

-- prepare a connection
local sth = assert(dbh:prepare(sql_string))

-- commit the transaction
dbh:commit()

-- finish up
local ok = dbh:close()
XXXXXXXXXXXXXX
throws the following error:./dbi.lua:4: too many C levels (limit is 200)
in main function near ''MySQL''"
Any idea how to solve this?