on became main theObject
--Loads properties into table
script loadProperties
set dataLocation to space & "~/Documents/InvestorsToolbox/Management.db" & space
set head to "sqlite3 -line" & dataLocation & quote
set tail to quote
set getAll to "select * from Property_Address;" & space
set propertyAddresses to do shell script head & getAll & tail
set contents of table view "propertylist" of scroll view "propertylist" of box "propertylist" of window "properties" to propertyAddresses
end script
--runs script to load properties into table
run loadProperties
end became main
This does not work. I was completely guessing on the set contents line so I could be completely wrong with that. Do you have to get as detailed as to say what data goes into what columns? And do you have to prepare the sqlite data somehow before you can even put it in a table?