PDA

View Full Version : SQLite Complie error


scotland42
03-09-2006, 03:43 PM
I am getting an error (30001) right after SQLite.Compile...
For the life of me, I can't seem to figure it out. Does anyone have any suggestions?

function getStoredCRC(f)
Application.SetLastError(0)
SQLite.Compile(db, "SELECT * FROM CRCTable WHERE Filename = " .. f .. ";")
Debug.Print(Application.GetLastError())
SQLite.Step(db)

local crctbl = SQLite.GetRowDataAssoc(db)

SQLite.Finalize(db)
return crctbl.CRC

end

Thanks in advance!
Nathan

Dermot
03-09-2006, 05:26 PM
Hi Nathan

The problem is this line:
SQLite.Compile(db, "SELECT * FROM CRCTable WHERE Filename = " .. f .. ";")

It should be:
SQLite.Compile(db, "SELECT * FROM CRCTable WHERE Filename = '" .. f .. "'")