Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# SQlite Connection String Format

I have a 2 part question here:

  1. I downloaded SQLite from SQLite Website and for .NET 4.5 there was a "mixed" mode version and a "non-mixed mode" version. How do I know which one I should use?

When making a connection I use the following command:

>sqlite_conn = new SQLiteConnection("Data Source=db.db;Version=3;New=True;Compress=True;");

  1. The "Version=3" I assume represents the version of SQLite being used. If I download from the link above, the version says System.Data.SQLite 1.0.84.0 (3.7.15.2) package; should I change the Version=3 to Version=3.7.15.2 instead?
like image 300
Kairan Avatar asked Mar 31 '13 04:03

Kairan


1 Answers

  1. You should pick the Mixed one.
  2. the 1.0.84.0 is the newest version out for the SQLite DLL. I created an application with SQLite too in c#, my connection string looks like the following:

    sqlite_conn = new SQLiteConnection("Data Source=C:\SQLITEDATABASES\SQLITEDB1.sqlite;Version=3;");
    

The version you are using, is SQLite version 3, the DLL is just a different version, but works with SQLite version 3.

like image 146
Max Avatar answered Oct 15 '22 05:10

Max