[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gambas-bugtracker] Bug #2986: sqlite connection "Database does not exist"


http://gambaswiki.org/bugtracker/edit?object=BUG.2986&from=L21haW4-

Comment #11 by bruce B:

I can imagine the use of read-only-databases (delivered with the app) and why shouldn't it be possible to open them for reading while they reside in the project root path?
    
    I have used databases inside the exe for years to store complex configuration data. Which of course should be read-only at execution time. 
    Looking back, I always copied the database file (sqlite) to the Temp directory at startup and access it there. Never had a problem.  

What I could suggest is that at runtime, when a relative path with a null host is seen, the sqlite3 will search the database file inside the project executable, and then make a >copy into a temporary file so that the database can be opened.

    (Opinion) Automatically copying the database file may give the user/developer the idea that they are now writable and wonder why their database isn't updated when next they run the executable.
    I think the real answer is to educate the developer (with a sledgehammer if necessary) what relative paths mean.


----[ Gambas bugtracker-list is hosted by https://www.hostsharing.net ]----