Abhilash J A

Abhilash J A

  • 538
  • 2.4k
  • 596.4k

How establish defult connection to DB in Windows Application

Nov 6 2016 9:25 AM
Hello everyone,
 
 I am using a SQLite database in a WPF windows application. After installing the windows application the database inside this folder like this.

 
static SQLiteConnection dbConnection = new SQLiteConnection(@"Data Source=C:\Program Files (x86)\hedronix\qScan\test.s3db;");  

But when I am trying to access the database from this location of the windows application showing this error.

"attempt to write a readonly database\r\nattempt to write a readonly database
  1. How can I solve that?

  2. In this situation, how can I set default connection string for accessing SQLite database after install this application on any local computer?


Answers (4)