SQLiteConnection not accepting sting as argument

110 views Asked by At

I am trying to connect to a SQLite .db file by using some examples that I found on the internet:

var m_connection = new SQLiteConnection("Data Source=Tabs.db;version=3;");

However, Visual Studio 2015 won't accept that because it says it doensn't accept just one argument.

SQLiteConnection.SQLiteConnection(SQLite.Net.Interop.ISQLitePlatform, string, bool, SQLite.Net.IBlobSerializer, System.Collections.Generic.IDictionary, System.Collections.Generic.IDictionary, SQLite.Net.IContractResolver)

is what shows up in the object browser. All of the examples seem straightforward, what am I encountering? I downloaded SQLite.Net-PCL 3.1.1

1

There are 1 answers

0
pm100 On BEST ANSWER

sounds like you are confusing system.data.sqlite https://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki (from the sqlite team) with sqlite.net https://github.com/oysteinkrog/SQLite.Net-PCL

Sqlite.net does not have a single string constructor.

If you are working on windows only I suggest you use system.data.sqlite (or consult the sqlite.net documentation)