Adjustments to open database and prepare statement
Merge pull request #2 from flipstudio/Fixes

Adjustments to open database and prepare statement