简体   繁体   English

从Windows 8.1应用程序将SQLite数据库存储到本地文件系统

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

I have made a Windows 8 store App. 我已经制作了Windows 8应用商店应用。 I want to make a SQLite database inside it, which can be stored on a filesystem on my computer ,in a location like "C:/My Documents/File.sqlite". 我想在其中创建一个SQLite数据库,该数据库可以存储在计算机上的文件系统中,位于“ C:/ My Documents / File.sqlite”之类的位置。 I am unable to figure out how to do that. 我无法弄清楚该怎么做。 Can anyone please suggest a way to do that. 任何人都可以建议一种方法来做到这一点。 Thanks in advance. 提前致谢。

The ultimate purpose is to read the database file from an external windows service. 最终目的是从外部Windows服务读取数据库文件。 The windows service is unable to read from the App's local storage folder. Windows服务无法从应用程序的本地存储文件夹中读取。 If there is any way to do that, that could also work. 如果有任何方法可以做到这一点。

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.

相关问题 从Windows应用商店App导出Sqlite数据库 - Export Sqlite database from Windows Store App Windows 8.1 Windows Store应用程序上的Sqlite-net-无法编译“ Not” - Sqlite-net on Windows 8.1 Windows Store app - cannot compile “Not” Windows 8.1 Windows应用商店sqlite更新声明 - WIndows 8.1 windows store app sqlite Update statement Windows商店应用程序8.1 httpclient请求在本地专用网络中失败 - windows store app 8.1 httpclient request failes in local private network 将Windows Phone 8.1 Store应用连接到现有的Azure SQL数据库 - Connect a Windows Phone 8.1 Store App to an Existing Azure SQL Database Windows Store应用程序中的本地和远程数据库 - local and remote database in Windows Store app 将TimeSpan存储在Windows Phone 8应用本地数据库中 - Store a TimeSpan in a Windows Phone 8 app local database SQL Server的Windows Phone 8.1 Silverlight应用程序中的本地数据库 - Local database in Windows Phone 8.1 Silverlight application from SQL Server Windows 8.1存储应用程序C#中从字符串到对象的转换 - Conversion from string to object in Windows 8.1 store app c# 从商店下载Windows Phone 8.1应用程序时崩溃 - Windows Phone 8.1 app crashes when downloaded from store
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM