Page 1 of 1

UNIDAC Update (unidac61d15pro.exe) Problems!

Posted: Wed 22 Apr 2015 08:08
by unidac5src
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!

Re: UNIDAC Update (unidac61d15pro.exe) Problems!

Posted: Wed 22 Apr 2015 09:25
by AlexP
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.

Re: UNIDAC Update (unidac61d15pro.exe) Problems!

Posted: Thu 23 Apr 2015 01:40
by unidac5src
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.

Re: UNIDAC Update (unidac61d15pro.exe) Problems!

Posted: Thu 23 Apr 2015 08:30
by AlexP
Please send the database file for us to reproduce the problem.

Re: UNIDAC Update (unidac61d15pro.exe) Problems!

Posted: Fri 24 Apr 2015 01:08
by unidac5src
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

Re: UNIDAC Update (unidac61d15pro.exe) Problems!

Posted: Fri 24 Apr 2015 08:41
by AlexP
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;