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:");
3 Comments
Steztric
This doesn't work for me. I get an exception 'The path is not of a legal form.'
AZ_
@Steztric try not putting a space between Data Source => new SqliteConnection("DataSource=:memory:")
Skorunka František
var connection = new SqliteConnection("Filename=:memory:");Maybe it's too late, but FullUri=file::memory:?cache=shared; is working.
2 Comments
Andez
Any more info? I get
System.ArgumentException : Keyword not supported: 'fulluri'. using var connection = new SqliteConnection("FullUri=file::memory:?cache=shared;");ghord
@Andrez Lowercase
SqliteConneciton you are using is from different package Microsoft.Data.Sqlite which doesn't work with FullUri parameter.