Create Table in SQLite
Posted: Wed Jul 23, 2014 10:49 pm
I'm trying this again after many strikeouts, by using the code in the SQLite Sampler. The code for open database and for close database works fine. but the code for create table always throws an error, even with slight changes in (s and )s and ,s. Always the same error on the same line. Appreciate any help. Here is code and error:
error line:
button "Create Places Table":execution error at line 11 (Handler: can't find handler) near "gConID", char 8
That sounds to me like it can't find the rev function ExecuteSQL, but how could that be? Thanks in advance for any help.
Code: Select all
local tSQL
local tTmp
on mouseUp
global gConID
if gConID = "" then
answer information "No Database Connected"
exit mouseUp
end if
put "CREATE TABLE places (placeID integer primary key, company text, address text)" into tSQL
answer tSQL
put revExecuteSQL gConID tSQL, tTmp *****error line*****
handleRevDBerror tTmp
if the result is not empty then
answer warning the result
exit mouseUp
end if
answer information "No of Tables Added: " & tTmp
end mouseUp
button "Create Places Table":execution error at line 11 (Handler: can't find handler) near "gConID", char 8
That sounds to me like it can't find the rev function ExecuteSQL, but how could that be? Thanks in advance for any help.