-- Lua sample: list all files in a database

database = sqlitedatabase:new()
database:filename("C:\\ProgramData\\SQLite Expert\\Professional 5 - 32bit\\Data\\dbdemos.db3")
database:open()
query = sqlitequery:new()
query:database(database)
query:sql("select * from sqlite_master where type = \"table\"")
query:open()
query:first()
while (query:eof() == false) do
  print(string.format("%-30s\n",query:getfield("name"):value()))
  query:next()
end
query:free()
database:free()