UNIDAC Update (unidac61d15pro.exe) Problems!

Discussion of open issues, suggestions and bugs regarding LiteDAC (SQLite Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
unidac5src
Posts: 8
Joined: Wed 22 Apr 2015 07:33

UNIDAC Update (unidac61d15pro.exe) Problems!

Post by unidac5src » Wed 22 Apr 2015 08:08

I use SQLite Database using Unidac.
I have 2 problems after updating recent Unidac (File: unidac61d15pro.exe).


1. TUniConnection SpecificOptions "SQLite.FetchAll" is gone!

So I could not run my program.
I solved this problem by removing that option.
That's simple but I want to ensure same operation before this update.
Is that right?


2. SQLite Encyption is different! (This is critical!)

I could encrypt SQLite3 file by using Unidac encryption option.
Before this update, I could encrypt header data of SQLite3 file (except Magic Header String).
But now, Header data is not encrypted!
So I cannot open files that are created before.
Please let me know solution to operating like before!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: UNIDAC Update (unidac61d15pro.exe) Problems!

Post by AlexP » Wed 22 Apr 2015 09:25

Hello,

1) There are no such option in TUniConnection (Only in DataSet). In the new version we have introduced a check for SpecificOptions and their values. Now, when you try to use a non-existent option, or assign an invalid value, you will receive an error message.

2) Please specify the previous UniDAC version, on which you have encrypted the file, that you can't decrypt on the current version. In addition, specify the used encryption algorithm.

unidac5src
Posts: 8
Joined: Wed 22 Apr 2015 07:33

Re: UNIDAC Update (unidac61d15pro.exe) Problems!

Post by unidac5src » Thu 23 Apr 2015 01:40

1) I used Custom TUniConnection (inherited TUniConnection) and add custom option to it(SpecificOptions). Later I removed that code but not removed in TDataModule DFM file. But no problems before updating recent version. I think that you changed handling logic about custom properties at recent version. Anyway it's my mistake.

2) I use Delphi XE. I use encryption property "leAES256"
Previous UniDAC version is 6.0.2 (unidac602d15pro.exe).
Current UniDAC version is 6.1 (unidac61d15pro.exe).

I changed nothing in my source codes. I only update UniDAC version. But my program cannot loading saved files by creating current UniDAC version(I mistake yesterday. I can open previous saved file). Because I use SQLite header data. Previous UniDAC version encrypt SQLite3 header data except magic header string. But current UniDAC version doesn't encrypt All of SQLite3 header data. My program use header data for detecting files whether enrypted or not. I want option that can encrypt like previous version. Already, My program released as global commercial service. So it's very difficult to change my program.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: UNIDAC Update (unidac61d15pro.exe) Problems!

Post by AlexP » Thu 23 Apr 2015 08:30

Please send the database file for us to reproduce the problem.

unidac5src
Posts: 8
Joined: Wed 22 Apr 2015 07:33

Re: UNIDAC Update (unidac61d15pro.exe) Problems!

Post by unidac5src » Fri 24 Apr 2015 01:08

I link image and files.

First, reference this SQLite3 page.
http://www.sqlite.org/fileformat2.html

As "1.2.4 Reserved bytes per page", I can detect database files whether encrypted or not.
If not encrypted, it is all-zero.

Previous UniDAC (6.0.2) encrypt all header data except magic header ("SQLite format 3.").
So "Reserved bytes per page" area is not all-zero.

But current UniDAC (6.1) doesn't encrypt header data.
So always "Reserved bytes per page" area is all-zero. I can't detect database file is encrypted.

I attach data file header area image.
[Version 6.0.2] - Download http://file.netpas.net/ftp/temp/UniDAC602.sqlite3
Image

[Version 6.1] - Download http://file.netpas.net/ftp/temp/UniDAC61.sqlite3
Image

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: UNIDAC Update (unidac61d15pro.exe) Problems!

Post by AlexP » Fri 24 Apr 2015 08:41

This was done for ability to modify page size and execute the VACUUM command in an encrypted database. To check whуther the database is encrypted or not, you can just open connection:

Code: Select all

  UniConnection1.ProviderName := 'SQLite';
  UniConnection1.SpecificOptions.Values['Direct'] := 'True';
  UniConnection1.Database := 'd:\encrypt.db3';

  try
    UniConnection1.Connect;
  except
    on E: EUniError do
      case E.ErrorCode of
        11: ShowMessage('Database encrypted');
        else
          ShowMessage('Other Error');
      end;
  end;

Post Reply