Reputation: 4807
I am new to c#, how do I read local database file in C# WPF?
I have tried this tutorial: Link.
But I can`t manage get it to work, where do I put .db file, can some one point me to good tutorial or show the right direction.
Upvotes: 1
Views: 2919
Reputation: 4179
try this;
string dbfile = "C:\\.....\\datasabename.db";
string connStr= "Data Source=" + dbfile + ";Version=3;Synchronous=Off;UTF8Encoding=True;";
SQLiteConnection sqlConn= null;
sqlConn = new SQLiteConnection(connStr);
sqlConn.Open();
Upvotes: 1