2016-06-09 1 views
0

는 나중에 내가 다음 줄을 시도하고SQLiteConnection, C#을

"--PCL 실버 sqlite.net"는 NuGet 패키지를 설치, 내 비주얼 스튜디오 2015 프로젝트 '유니버설 앱 플랫폼에 대한 SQLite는 "에 대한 참조를 설치 :

string dbPath = Path.Combine(ApplicationData.Current.LocalFolder.Path, "Storage.sqlite"); 
SQLiteConnection DB = new SQLiteConnection(dbPath); 

그것은 작동하지 않습니다하지만이 라인이 유효 함을 발견

내 문제는 내가 sqlitePlatform의 값을 지정할 수있는 모르겠입니다
SQLiteConnection DB = new SQLiteConnection(sqlitePlatform, dbPath); 

... 그러는하세요 피.

+0

var 연결 = 새 SQLiteConnection (새 SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), 경로)'트릭을 수행해야합니다 ... –

+0

자세한 내용은 여기를 참조하십시오. http://www.shenchauhan.com/ 블로그/2015/11/25/sqlite-and-uwp –

+0

대단히 감사합니다. 완벽하게 작동합니다. SQLiteConnection (새 SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), 경로) – Xavier

답변

0

UWP의 경우 WinRT와 동일한 sqlitePlatform이 작동해야합니다. 어서이 시도 : 당신을 위해 일한다

var connection = new SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), path);

합니다.

관련 문제