I'm trying to implement the export functionality for my database application. I'm using C# and have the SQlite wrapper for C# that I'm using. Pardon my ignorance of database concepts/common usage, this is my first database application.
Export : Easily enough, the SQLite databases are stored in a single s3db file. So, to export, I simply need to copy that file using System.IO.File.Copy? Is that the best way to do this? Lastly, with export, do I need to close all database connections before copying the file? Again, best practices for this situation would be a great help... I'm unsure as to a few things in this situation. For example...
What if the database is huge and the copy takes a while? The user could start a export, then immediately go and try to insert something into the database, which would obviously be an issue. Should I lock the program while copying?
As always, thank you for any assistance.