chunk: can't find background
Posted: Fri Oct 25, 2013 6:13 pm
I'm following the video series for the summer school exactly, yet ran into a problem... when I go to run SQLite it says - card "contacts": execution error at line 25 (Chunk: can't find background), char 23
Looking at Elenor's code it's exactly the same, so what's wrong? I've underlined the line of code in question. Thanks!
local sDatabaseConnectionID
on preOpenCard
# mobGUIStart ---> Inserted by mobGUI plugin
if "MobGUILib-1382476204176.13208" is not among the lines of the stacksInUse then start using stack "MobGUILib-1382476204176.13208"
mobGUIPreOpenCard me
# mobGUIEnd
set the uText of group "title" to "Contacts"
end preOpenCard
on databaseConnect pType
if pType is "SQLite" then
put specialFolderPath("documents") & "/contacts.sqlite" into tDatabasePath
put revOpenDatabase("sqlite",tDatabasePath,,,) into sDatabaseConnectionID
else if pType is "Direct MySQL"
else if pType is "Web MySQL"
end databaseConnect
on databaseSelectAllNames
if the uOptionText of group "databaseType" is "SQLite" or the uOptionText of group "databaseType" is "Direct MySQL" then
put empty into field "contacts"
put "SELECT firstname,lastname,contact_id FROM contacts" into tSQLQuery
put revDataFromQuery(comma,return,sDatabaseConnectionID,tSQLQuery) into tContacts
put tContacts into field "contacts"
end if
end databaseSelectAllNames
Looking at Elenor's code it's exactly the same, so what's wrong? I've underlined the line of code in question. Thanks!
local sDatabaseConnectionID
on preOpenCard
# mobGUIStart ---> Inserted by mobGUI plugin
if "MobGUILib-1382476204176.13208" is not among the lines of the stacksInUse then start using stack "MobGUILib-1382476204176.13208"
mobGUIPreOpenCard me
# mobGUIEnd
set the uText of group "title" to "Contacts"
end preOpenCard
on databaseConnect pType
if pType is "SQLite" then
put specialFolderPath("documents") & "/contacts.sqlite" into tDatabasePath
put revOpenDatabase("sqlite",tDatabasePath,,,) into sDatabaseConnectionID
else if pType is "Direct MySQL"
else if pType is "Web MySQL"
end databaseConnect
on databaseSelectAllNames
if the uOptionText of group "databaseType" is "SQLite" or the uOptionText of group "databaseType" is "Direct MySQL" then
put empty into field "contacts"
put "SELECT firstname,lastname,contact_id FROM contacts" into tSQLQuery
put revDataFromQuery(comma,return,sDatabaseConnectionID,tSQLQuery) into tContacts
put tContacts into field "contacts"
end if
end databaseSelectAllNames