PDA

View Full Version : Sqlite error



Moiz Palaci
10-31-2005, 05:08 PM
I am getting an error:

attempt to index global 'sqlite' (nil value)

on startup,

does anybody know why?

Moiz

TJ_Tigger
10-31-2005, 08:00 PM
Is this for a project or template that you are using? It sounds like a project that references a database it cannot find so it cannot query the sqlite master table.

Moiz Palaci
11-01-2005, 02:09 AM
Is this for a project or template that you are using? It sounds like a project that references a database it cannot find so it cannot query the sqlite master table.

It is a project,
I will check the code again, it works on one application (my test) and fails on the main application:

=========
---Delete old database to refresh database if files are changed
File.Delete(_SourceFolder .. "\\AutoPlay\\Docs\\Images.db", false, false, false, nil);
---set db path
sImageDatabase = _SourceFolder .. "\\AutoPlay\\Docs\\Images.db";
---Open the database, or in abscence, create one
db = SQLite.Open(sImageDatabase);
nLastError = Application.GetLastError();
if nLastError ~= SQLite.OK then
Dialog.Message("Error Opening File", SQLite.GetLastErrorString());
end
==========

It tells me that it fails on line 6 (bold)

Moiz