簡體   English   中英

從Windows 8.1應用程序將SQLite數據庫存儲到本地文件系統

[英]Store a SQLite Database to local filesystem from a windows 8.1 App

我已經制作了Windows 8應用商店應用。 我想在其中創建一個SQLite數據庫,該數據庫可以存儲在計算機上的文件系統中,位於“ C:/ My Documents / File.sqlite”之類的位置。 我無法弄清楚該怎么做。 任何人都可以建議一種方法來做到這一點。 提前致謝。

最終目的是從外部Windows服務讀取數據庫文件。 Windows服務無法從應用程序的本地存儲文件夾中讀取。 如果有任何方法可以做到這一點。

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);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM