How can I access SQLite with C#? How can I access SQLite with C#? sqlite sqlite

How can I access SQLite with C#?


SQLite in C# (requires System.Data.SQLite in references)

// Required references, after installing SQLite via Nugetusing System.Data.SQLite;using System.Data.Common;// Example usage in code...SQLiteConnection db = new SQLiteConnection("Data Source=C:\LocalFolder\FooBar.db;FailIfMissing=True;");db.Open();using (SQLiteCommand comm=db.CreateCommand()) {  comm.CommandText = requete_sql;  IDataReader dr=comm.ExecuteReader();  while (dr.Read())  {    //...  }}


You can not connect to sqlite db using SQLProvider classes. They are for sql server. You need to use SQLite provider classes.