If you are closing and opening a connection, and the connection string contains a relative path to the database, and you are using the Open File dialog, then the problem is that the Open File dialog is changing your CurrentDirectory and the database's relative path no longer points to the same place it was pointing when the application first started.
You can change your connection string to "Data Source=|DataDirectory|mydatabase.db" instead, and |DataDirectory| will be switched at runtime to your application's designated data directory, or if none was configured, the application's folder.
Robert