Nov-07-2020, 05:26 AM
I guess I'm not really understanding what you want to do. I thought you wanted to be able to run the program from a different place to where the database ia stored. You then either need to hardcode the path to it (meaning you'd have to change the program if you moved it) or pass it in to the program somehow (command line argument, config file, environment variable, ...). Of course, your program could scan your file system(s) to try and discover where the file is, but that may be slow and do you really want to write code to do that anyway?