Reputation: 49812
I have tried SQLiteConnection(":memory:")
and SQLiteConnection("sqlite::memory:")
but both of these fail with 'Invalid ConnectionString format'
Upvotes: 55
Views: 37322
Reputation: 857
I'm using this:
var connectionStringBuilder = new SQLiteConnectionStringBuilder { DataSource = ":memory:" };
var connection = new SQLiteConnection(connectionStringBuilder.ToString());
Upvotes: 7
Reputation: 1323
Maybe it's too late, but FullUri=file::memory:?cache=shared;
is working.
It's knowledge from forum question
Upvotes: 4
Reputation: 70369
try
var connection = new SQLiteConnection("Data Source=:memory:");
Upvotes: 95