2014-06-06 3 views
0

Windows 8 store app를 만들었습니다. 내 컴퓨터의 파일 시스템에 "C :/My Documents/File.sqlite"와 같은 위치에 저장할 수있는 SQLite 데이터베이스를 만들고 싶습니다. 나는 그것을하는 방법을 알아낼 수 없습니다. 누구든지 그렇게 할 수있는 방법을 제안 할 수 있습니까? 미리 감사드립니다.Windows 8.1 App에서 로컬 파일 시스템에 SQLite 데이터베이스 저장

궁극적 인 목적은 외부 Windows 서비스에서 데이터베이스 파일을 읽는 것입니다. Windows 서비스에서 App의 로컬 저장소 폴더를 읽을 수 없습니다. 그렇게 할 수있는 방법이 있다면 그것은 또한 효과가있을 수 있습니다.

+0

아직 시작하지 않은 경우 여기에서 시작할 수 있습니다. http://blog.jerrynixon.com/2012/06/windows-8-how-to-read-files-in-winrt.html –

답변

0
The database will be stored in the app's local data and you can update your DB from there. 

Path : C:\Users\sunilkumar.s\AppData\Local\Packages\"Your App Package"\LocalState\ 

You can access this in c# using this code 

string strPath = ApplicationData.Current.LocalFolder.Path; 
string strDatabaseName = "ABCD.db"; 
strFinalPath = System.IO.Path.Combine(strPath, strDatabaseName); 
관련 문제