Terence Heaford wrote:
Is there a LC function for checking if a table exists in an sqlite database or
do I have to do something like this?
function doesTableExist tTableName
put replaceText(tTableName,"'","''") into tTableName
put merge(“SELECT count() FROM sqlite_master WHERE type = 'table' AND name=
'[[tTableName]]'") into tSQL
put revDataFromQuery(tab, return, myDB, tSQL) into tCount
if tCount = 1 then
return true
else
return false
end if
end doesTableExist
The example given in the Dictionary entry for the revDatabaseTableNames
function may do what you need:
if tTableName is among the lines of \
revDatabaseTableNames(sgDatabaseId) then
...
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
ambassa...@fourthworld.com http://www.FourthWorld.com
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode