sqlite3.open

Opens or creates a database

Prototype

sqlite3.open(filename)

Description

Opens (or creates if it does not exist) an SQLite database with name filename and returns its handle as userdata (the returned object should be used for all further method calls in connection with this specific database, see db:xxx methods). Example:

myDB=sqlite3.open('MyDatabase.sqlite3') -- open
-- do some database calls...
myDB:close() -- close

In case of an error, the function returns nil, an error code and an error message.

Lua functions

Topics