0
我在Visual Studio中項目2015年安裝了「SQLite的通用應用平臺」的提法,後來我安裝了NuGet包「sqlite.net-PCL-silverlight的」SQLiteConnection,C#
我想下面的行:
string dbPath = Path.Combine(ApplicationData.Current.LocalFolder.Path, "Storage.sqlite");
SQLiteConnection DB = new SQLiteConnection(dbPath);
它不工作,但我發現,這行是有效的:
SQLiteConnection DB = new SQLiteConnection(sqlitePlatform, dbPath);
我的問題是,我不知道這應該是sqlitePlatform的價值......請HEL頁。
'var connection = new SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(),path)'應該這樣做...... –
請參閱這裏瞭解更多信息:http://www.shenchauhan.com/ blog/2015/11/25/sqlite-and-uwp –
非常感謝你,它完美的工作; SQLiteConnection(新的SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(),路徑) – Xavier