`

file is encrypted or is not a database

 
阅读更多

 

 

 

static String DB_PATH = "/data/data/com.yuzhiyun.chemistry/databases/";
static String DB_NAME = "sqlite3.db";

private SQLiteDatabase db;

this.db = SQLiteDatabase.openDatabase(DB_PATH+DB_NAME,null,SQLiteDatabase.OPEN_READWRITE);

         代码如上,在执行SQLiteDatabase.openDatabase()的时候出现了这个错误:

 

 file is encrypted or is not a database

        后来网上有人说是sqlite的版本问题,不明就里的我查看了一下使用的数据库,版本是2,我立刻用Navicate重新建了一个sqlite数据库连接,选择版本3,再把数据导入,结果就不会出现这个错误了,具体的原因我还不明白。

 



 

 

 

 

 

  • 大小: 30.2 KB
分享到:
评论

相关推荐

    File opened that is not a database file file is encrypted.docx

    总结起来,Android 9.0及以上版本中遇到“File opened that is not a database file file is encrypted or is not a database”的问题,主要是由于WAL模式的默认开启。开发者需要了解这一变化,并适当地调整代码,...

    C#连接加密的Sqlite数据库的方法

    对数据加密分两种,一种是对...System.Data.SQLite.SQLiteException:“file is encrypted or is not a database ,  正确的连接方式就是在连接字符串中提供正确的密码: using System; using System.Collections.Gen

    DB2 v9.7 java development

    DB2 v9.7为Java开发者提供了两种主要的接口:JDBC(Java Database Connectivity)和SQLJ。JDBC是一种标准的Java API,允许Java应用程序连接到各种类型的数据库。而SQLJ则是一种将SQL语句嵌入Java源代码的方法,提供...

    DISQLite_Pro_5.15_D7-RX10.1

    A complete database is stored in a single (possibly encrypted) disk file. Supports terabyte-sized databases and gigabyte-sized strings and blobs. Self-contained: no external dependencies, no DLLs. ...

    DISQLite3 v5.18.0

    A complete database is stored in a single (possibly encrypted) disk file. Supports terabyte-sized databases and gigabyte-sized strings and blobs. Self-contained: no external dependencies, no DLLs. ...

    DISQLite3_5.20.0_Source

    A complete database is stored in a single (possibly encrypted) disk file. Supports terabyte-sized databases and gigabyte-sized strings and blobs. Self-contained: no external dependencies, no DLLs. ...

    计算机网络第六版答案

    An Internet Exchange Points (IXP) (typically in a standalone building with its own switches) is a meeting point where multiple ISPs can connect and/or peer together. An ISP earns its money by ...

    Exchange Server 2010 Unleashed.pdf

    tolerant if a server was down for a day or two. Today, email has become an extremely important, if not primary, method of communication for organizations. Downtime on an Exchange server can bring an ...

    EurekaLog_7.5.0.0_Enterprise

    18)..Fixed: Possible "Unit XYZ was compiled with a different version of ABC" when using packages 19)..Fixed: FastMM shared MM compatibility 20)..Fixed: Minor bugs in stack tracing (which usually ...

    FastReport.v4.15 for.Delphi.BCB.Full.Source企业版含ClientServer中文修正版支持D4-XE5

    + added option EmbedProt which allows to disable embedding fonts into an encrypted PDF file + added TfrxDateEditControl.WeekNumbers property - fixed bug in XML and PDF exports with Korean charmap - ...

Global site tag (gtag.js) - Google Analytics