繁体   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