luasql

Luasql and SQLite?

Hello I just got started looking at Lua as an easy way to access the SQLite DLL, but I ran into an error while trying to use the DB-agnostic LuaSQL module: require "luasql.sqlite" module "luasql.sqlite" print("Content-type: Text/html\n") print("Hello!") Note that I'm trying to start from the most basic setup, so only have the follo...

Lua SQL: peeking at cursors

I am using LuaSQL, and query for a result set using con:execute(sql_stmt), which returns a cursor. How do I see if there is at least one row in that resultset, without doing a cursor:fetch to pop that first row? ...

How to link LuaSQL in a C++ application?

My script runs fine when I execute it from outside the application (terminal), but when its called from inside the C++ application it shuts down in the require("luasql.mysql") call. Can anyone help? ...

How do I close all open cursors in Lua?

What's the proper pattern to close all open cursors in a lua script before closing the db connection? I have a helper function rows() that is called in multiple places which creates cursors, on the function end() I want to be able to close all that have been created. function rows (sql_statement) local cursor = assert (con:execute (s...