This is my code:
on awake from nib theObject
tell application "Finder"
if not (folder "InvestorsToolbox" of the (path to documents folder) exists) then
make new folder at (path to documents folder) with properties {name:"InvestorsToolbox"}
end if
end tell
set eValuatorDBLocation to space & "~/documents/InvestorsToolbox/eValuator.db" & space
set head to "sqlite3" & eValuatorDBLocation & quote
set tail to quote
set tableName to "eValuatorData"
set newTable to "create table" & tableName & "prepertyname, propertyvalue);"
do shell script head & newTable & tail
end awake from nib
The problem I’m running into is that the first time the application is run everything works as it should. But the second time the application is run I get a table already exists error. I do not want my program to pop up this error everytime the application is run. How do I get it so that the error dosen’t pop up?