简体   繁体   中英

why I can not open my sqlite database from firedac?

I can open my encrypted sqlite database with sqlite maestro application but I can not with fiedac I get this error

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

Here is my data module unit:

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

I wrote the encryption key as a password but when I not type any password I get error:

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

What is the problem ?

Found the problem. According to 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.

I can not encrypt with SQLite Maestro (different library) and open it in FireDAC so I must decrypt it then encrypt the database using FireDAC. I used the encryption sample the come with Delphi and now I can open it with FireDAC.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM