2012-02-07 84 views

回答

67

嘗試

var connection = new SQLiteConnection("Data Source=:memory:"); 
+1

這並不爲我工作。我得到一個例外:「路徑不是合法的形式。」 – Steztric 2017-01-27 11:52:46

2

我使用這個:

var connectionStringBuilder = new SQLiteConnectionStringBuilder { DataSource = ":memory:" }; 
var connection = new SQLiteConnection(connectionStringBuilder.ToString());