Getting rid of a table exists error sqlite

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?

It appears as though every time this portion of code is accessed, you force it to create a new table by building the create table string and sending it to do shell script. Instead, how about using an if/then to see if the table already exists, and if not, then build your create table string and have the table created.

Yes, I think what I will do is put the database code in with the if statement to create the folder. I should just need to rearrange the code to get it to work.