dimanche 1 novembre 2015

SQLite database not accessible upon install

I'm having trouble accessing my sqlite database after I install the program with InstallShield. I have the database referenced in the app.config file like shown below

<add name ="Database" providerName="System.Data.Sqlite" connectionString="Data Source =|DataDirectory|CKDatabase.db"/>

this is referenced by my c# code like shown below

string connectionStringCKDatabase = System.Configuration.ConfigurationManager.ConnectionStrings["Database"].ConnectionString;

When I install the program the database is included with the reference libraries and the application, but when I logon the error says "unable to open database file". The database doesn't have to be buried somewhere complex. It's just a simple reference. Obviously it works fine in regular debug mode. I know this is an easy question but I feel performing an install has very few resources for learning.

Aucun commentaire:

Enregistrer un commentaire