I'm using Mac OSX for the operating system.
I'm running a stack from lesson number 5 from the LiveCode Academy called "Simple Query Example" and it is giving the following error:
Code: Select all
invalid connection id
Code: Select all
local sDatabaseID
on preopencard
put empty into field "details"
end preopencard
on connectToDatabase
local tDatabasePath, tSQLQuery
## Connect to the database
## Save the connection id
put specialFolderPath("emailaddresses.sqlite") into tDatabasePath
put revOpenDatabase("sqlite",tDatabasePath,,,,) into sDatabaseID
end connectToDatabase
on displayDetails
## Query all details
## Put the result into the field
put "SELECT * from contact_details" into tSQLQuery
put revDataFromQuery(tab, return, sDatabaseID, tSQLQuery) into field "details"
end displayDetails
I made sure the database was in the same location as the other files for this stack.
Thanks.