SQL Phone数据库存储在Windows Phone 8.1中的哪个位置

时间:2014-10-04 12:41:24

标签: sqlite windows-phone-8.1

我的Windows Phone 8.1应用程序中有一个SQLite数据库。我正在使用此代码复制它

 public async void UpDatabase()
 {
        bool isDatabaseExisting = false;

        try
        {
            StorageFile storageFile = await ApplicationData.Current.LocalFolder.GetFileAsync("ComplainSys.db");
            isDatabaseExisting = true;
        }
        catch
        {
            isDatabaseExisting = false;
        }

        if (!isDatabaseExisting)
        {
            StorageFile databaseFile = await Package.Current.InstalledLocation.GetFileAsync("ComplainSys.db");
            await databaseFile.CopyAsync(ApplicationData.Current.LocalFolder);
        }
    }

我想访问存储它的位置。当我放置断点并检查该路径并尝试访问它时显示此错误。

enter image description here enter image description here

我如何访问?

2 个答案:

答案 0 :(得分:0)

ApplicationData.Current.LocalFolder是该文件夹。但我真的不知道你是如何尝试使用断点访问该文件夹的,你是否使用Windows资源管理器打开该文件夹?路径是手机存储的本地路径,而不是您的计算机的路径。

答案 1 :(得分:0)

我使用其他软件,我认为它比隔离存储更好,不需要在项目中添加外部类或相同...我使用了这个:http://isostorespy.codeplex.com/downloads/get/835310

只需解压缩文件夹并打开您的模拟器,打开模拟器,执行.exe并选择您的模拟器,然后您就可以浏览本地,漫游和临时文件夹。最后这个软件适用于Windows Phone 8+(8,8.1)。太容易了!

PD:如果你有问题建议我,祝你好运!