为什么我不能从 firedac 打开我的 sqlite 数据库?

why I can not open my sqlite database from firedac?

我可以用 sqlite maestro 应用程序打开我的加密 sqlite 数据库,但我不能用 fiedac 我得到这个错误

[FireDAC][Phys][SQLite] ERROR: Cipher: Invalid password is specified or DB is corrupted

这是我的数据模块单位:

object DM: TDM
  OldCreateOrder = False
  Height = 306
  Width = 468
  object FDConnection1: TFDConnection
    Params.Strings = (
      'Database=C:\myapps\mydb.db'
      'Password=mypass'
      'DriverID=SQLite')
    LoginPrompt = False
    Left = 48
    Top = 16
  end

我将加密密钥写为密码,但当我不输入任何密码时出现错误:

[FireDAC][Phys][SQLite] ERROR: file is encrypted or is not a database.

有什么问题?

找到问题了。根据the documentation:

The encrypted database format is not compatible with other similar SQLite encryption extensions. This means that you cannot use an encrypted database, encrypted with non-FireDAC libraries. If you need to do this, then you have to decrypt a database with an original tool and encrypt it with FireDAC.

我无法使用 SQLite Maestro(不同的库)进行加密并在 FireDAC 中打开它,因此我必须对其进行解密,然后使用 FireDAC 对数据库进行加密。我使用了 Delphi 附带的加密样本,现在我可以用 FireDAC 打开它。