I have tried SQLiteConnection(":memory:")
and SQLiteConnection("sqlite::memory:")
but both of these fail with 'Invalid ConnectionString format'
3 Answers
try
var connection = new SQLiteConnection("Data Source=:memory:");
I'm using this:
var connectionStringBuilder = new SQLiteConnectionStringBuilder { DataSource = ":memory:" };
var connection = new SQLiteConnection(connectionStringBuilder.ToString());
Maybe it's too late, but FullUri=file::memory:?cache=shared;
is working.
-
2Any more info? I get
System.ArgumentException : Keyword not supported: 'fulluri'.
usingvar connection = new SqliteConnection("FullUri=file::memory:?cache=shared;");
– AndezSep 23, 2018 at 21:37