how to connect to database

I made an application, which works with sqlite database.
I know, how to connect to a database, which I can look for during the execution of the application.
I know, how to connect to a certain Databasefile, which is in an directory called xy, which is subdirectory to the Desktop.
But how con I manage to bind the sqlite-Database to the programm, so that the user can put them together anywhere he wants?

I was not successful, using the CopyFile-method. I dragged I file into the list, but the file diddn’t occor anywhere.

There are several ways to accomplish this

  1. At start up create the database in the users application support folder (SpecialFolder.ApplicationData)
    see http://documentation.xojo.com/index.php/SpecialFolder

  2. instead of creating one from scratch copy and empty one from the applications resource to the application data and use that

  3. please it next to the application (this will have issues on most OSes because if the person does not have sufficient privileges they will not be able to write to the database if it is in Program Files of the Application directory)

CopyFile steps during the BUILD put things in your built applications resources - not on the users machine