1. <tfoot id='osg1n'></tfoot>
    1. <i id='osg1n'><tr id='osg1n'><dt id='osg1n'><q id='osg1n'><span id='osg1n'><b id='osg1n'><form id='osg1n'><ins id='osg1n'></ins><ul id='osg1n'></ul><sub id='osg1n'></sub></form><legend id='osg1n'></legend><bdo id='osg1n'><pre id='osg1n'><center id='osg1n'></center></pre></bdo></b><th id='osg1n'></th></span></q></dt></tr></i><div id='osg1n'><tfoot id='osg1n'></tfoot><dl id='osg1n'><fieldset id='osg1n'></fieldset></dl></div>

      <legend id='osg1n'><style id='osg1n'><dir id='osg1n'><q id='osg1n'></q></dir></style></legend>
      • <bdo id='osg1n'></bdo><ul id='osg1n'></ul>

      <small id='osg1n'></small><noframes id='osg1n'>

    2. SQLite 数据库副本在由设备而不是模拟器生成时出现损坏

      时间:2024-04-15
      <i id='To8eQ'><tr id='To8eQ'><dt id='To8eQ'><q id='To8eQ'><span id='To8eQ'><b id='To8eQ'><form id='To8eQ'><ins id='To8eQ'></ins><ul id='To8eQ'></ul><sub id='To8eQ'></sub></form><legend id='To8eQ'></legend><bdo id='To8eQ'><pre id='To8eQ'><center id='To8eQ'></center></pre></bdo></b><th id='To8eQ'></th></span></q></dt></tr></i><div id='To8eQ'><tfoot id='To8eQ'></tfoot><dl id='To8eQ'><fieldset id='To8eQ'></fieldset></dl></div>
        • <bdo id='To8eQ'></bdo><ul id='To8eQ'></ul>

          1. <legend id='To8eQ'><style id='To8eQ'><dir id='To8eQ'><q id='To8eQ'></q></dir></style></legend><tfoot id='To8eQ'></tfoot>
          2. <small id='To8eQ'></small><noframes id='To8eQ'>

                <tbody id='To8eQ'></tbody>
              • 本文介绍了SQLite 数据库副本在由设备而不是模拟器生成时出现损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                首先,我要感谢所有阅读本文的人.Stackoverflow 是一个了不起的网站,你们每天都以已经提交的问题的形式帮助我回答问题.你们都摇滚!

                First I want to say thanks to everyone that reads this. Stackoverflow is an amazing site and you guys help me out with answers everyday in the form of questions already submitted. You all rock!

                我的问题:

                我正在开发一个数据库应用程序,我想在某些点备份数据库,以便在开发过程中随着时间的推移将收集到的数据保存在数据库中.因此,为了将数据库保存到可访问的内存中,我遵循了这个页面:

                I'm working on a database app that I'd like to back up the database at certian points so I can save the data I've collected in database over time, during development. So to save the database to accessible memory I've followed this page:

                如何从我的数据库中提取数据库android 到我的桌面?

                ..上面的代码在模拟器中运行良好(我可以使用 DDMS 将数据库的副本拉到我的 PC 并使用 SQLite 数据库浏览器查看它).但是,当我在实际设备上运行它时,SQLite 数据库浏览器无法读取它.推断,副本在 SD 卡上创建得很好,但是当我从我的设备复制到我的 PC 并查看它时,我什么也没得到,SDB 无法理解它或其他东西.但是,当我使用模拟器时,我可以使用 DDMS 将其复制下来,并使用 SDB 很好地查看所有表.

                ..and the above code is working great in the emulator (I can use DDMS to pull the copy of the database to my PC and view it using SQLite Database Browser). However when I run it on an actual device, SQLite Database Browser can't read it. To extrapolate, the copy is being created just fine on the SD card, but when I copy to my PC from my device and view it, I get nothing, SDB can't understand it or something. However when I use an emulator, I can copy it off using DDMS and view all the tables just fine with SDB.

                使用 WinMerge 比较两个原始数据库文件(一个由设备生成,一个由运行相同代码的模拟器生成)我可以看到存在格式差异,但看起来没有任何损坏,但我不是 100% 当然.android 元数据和 SQL 序列表似乎在其中(尽管顺序不同),以及我的自定义表.

                Using WinMerge to compare the two raw database files (one generated by the device, one generated by the emulator both running the same code) I can see there are formatting differences, but nothing that looks corrupted, but I'm not 100% sure. The android metadata and SQL sequence tables appear to be in there (albeit in different orders), as well as my custom table.

                你们对如何调试有什么建议吗?我不确定从哪里开始,因为它似乎在模拟器上完美运行.此外,我在与设备相同的 android 版本 (2.3.3) 上运行模拟器,所以我非常确定他们使用的是相同的 SQLite 引擎.

                Do you guys have any suggestions on how to debug this? I'm not sure where to start since it seems to work perfectly on the emulator. Also, I've run the emulator at the same android release (2.3.3) as the device, so I'm am pretty sure they are using the same SQLite engine.

                谢谢,马特

                推荐答案

                我会尝试用不同的 SQLite 打开这个数据库 客户端.

                I'd try opening this database with different SQLite clients.

                如果这不起作用,下一步可能是尝试查找 SQLite 数据库文件 验证器和/或在调试模式下运行标准 SQLite 客户端(但老实说,我什至不知道最后两个选项是否可行).

                If that doesn't work, the next step may be to try finding an SQLite database file validator and/or to run the standard SQLite client in debug mode (but to be honest, I don't even know if those two last options are even possible).

                这篇关于SQLite 数据库副本在由设备而不是模拟器生成时出现损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:iPhone上的WebKit:是否可以使用JavaScript将文本复制到剪贴板 下一篇:Sqlite 数据库未从资产文件夹 Android 复制

                相关文章

                <tfoot id='AMcDd'></tfoot>
              • <small id='AMcDd'></small><noframes id='AMcDd'>

                • <bdo id='AMcDd'></bdo><ul id='AMcDd'></ul>
                  <i id='AMcDd'><tr id='AMcDd'><dt id='AMcDd'><q id='AMcDd'><span id='AMcDd'><b id='AMcDd'><form id='AMcDd'><ins id='AMcDd'></ins><ul id='AMcDd'></ul><sub id='AMcDd'></sub></form><legend id='AMcDd'></legend><bdo id='AMcDd'><pre id='AMcDd'><center id='AMcDd'></center></pre></bdo></b><th id='AMcDd'></th></span></q></dt></tr></i><div id='AMcDd'><tfoot id='AMcDd'></tfoot><dl id='AMcDd'><fieldset id='AMcDd'></fieldset></dl></div>
                  1. <legend id='AMcDd'><style id='AMcDd'><dir id='AMcDd'><q id='AMcDd'></q></dir></style></legend>