|
Post by bryandem on Nov 19, 2020 4:06:12 GMT
I'm wondering what the role of the working database is in the final app. Does it provide a "scratchpad" database that is used by the app at run-time, and can be modified and expanded by the user? And is the role of the embedded project database to provide a "factory" reset database for the user in case their working database becomes corrupted or unusable or deleted?
And is the working database even necessary if the user can only read but not write to it? And may not even be aware that a working database has been created on their hard drive, and should not be deleted:
C:\Users\User\AppData\LocalLow\Database_Name.bytes
In that case, can't the app just read the embedded, project database instead?
|
|
|
Post by echo17 on Nov 19, 2020 11:45:37 GMT
The SQLite library uses a file-based system where it has to connect directly to a physical file. The database in your project directory gets embedded when you build your project. This embedded asset is not readable since it is not a stand-alone physical file. SimpleSQL extracts this embedded resource to a file in a working directory, which the SQLite library can then connect to. If you don't want people to access this file, you can delete it when your application closes. Just be sure to call Close and Dispose on the SimpleSQLManager object to free up the lock on the file. Please see these FAQs for more information: Where is the working copy of my database located? Extraction Process
|
|