Page 2 of 2

Re: Path to database

Posted: Sun Sep 29, 2019 6:30 pm
by redfield
Well through this script

Code: Select all

on openStack
   put specialfolderpath("home") & "/newfolder" into targetFolder  
   if there is not a folder targetFolder then
      create folder specialfolderpath("home") & "/newfolder"
   end if
   put specialfolderpath("resources") & "/db_test" into tSourceFile
   put specialfolderpath("home") & "/newfolder/db_test" into tTargetFile 
   if there is not a file tTargetFile then
      put URL("binfile:" & tSourceFile) into URL("binfile:" & tTargetFile)
   end if
end openStack
there was actually a database file but it was empty and contained no tables. Now with the 'Copy file' setting, the database file with all its tables is available.

Re: Path to database

Posted: Sun Sep 29, 2019 6:36 pm
by Klaus
Okie Dokie!

Save some more typing by "re-using" variables:

Code: Select all

on openStack
   put specialfolderpath("home") & "/newfolder" into targetFolder  
   if there is not a folder targetFolder then
      create folder targetFolder
   end if
...
:D

Re: Path to database

Posted: Sun Sep 29, 2019 7:58 pm
by redfield
Good point - should be even obvious for a beginner like me :|

Re: Path to database

Posted: Sun Sep 29, 2019 8:57 pm
by bogs
Don't take it so hard redfield, after you reach 11 million posts like Klaus has, I'm sure whose a beginner or not starts to blur.... :twisted: