Again it is me with the files problem
Ok, first i got problem opening the database file, but then i found a topic in the forum which helped me to understand why i need to copy my sqlite file before trying to use it.
Now, my question is this... is it a good idea to call my dataDbConnect function in preOpenStack? Please see the code bellow.
Code: Select all
on dataDbConnect
put specialfolderpath("resources") & "/data.sqlite" into tDatabasePath
put specialfolderpath("Documents") & "/data.sqlite" into tAccessibleDatabasePath
-- copy it out of the application folder if you dont want to spend your hours pulling your hair
--trying to understand whats wrong
put URL ("binfile:" & tDatabasePath) into URL ("binfile:" & tAccessibleDatabasePath)
put revOpenDatabase("sqlite", tAccessibleDatabasePath, , , , ) into tID
answer tID
put tID into gDataDbID
end dataDbConnect
Thanks