I made a C# winform application. I used Installshield Limited Edition to package my application.
My application uses sqlite database. The application is installed to
C"\Program Files\MySoft\
However sqlite database is copied to different folder while installation.
If the database is copied to application data folder
C:\Users\<user>\AppData\Roaming
Everything works fine. I want my application to be used by all users and they all make changes on same database. So I changed the installation setup to copy database file to C:\ProgramData
After installation, When I run my application, everything works fine except the database connectivity is slow and I cannot make changes on the database via my c# application, i.e. database is not writable or i cannot insert record or update existing records .
Here is my connection string
string AppPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
dbName = System.IO.Path.Combine(AppPath , "MySoft\\data\\mysoftacc.sqlite");
dbConnection = "Data Source=" + dbName + ";Version=3;";
How to make my application work perfectly in this scenario so that all users can read and write data efficiently?
Thanks
Aucun commentaire:
Enregistrer un commentaire