SQLite Database encryption error occurr

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ibdac1pro
Posts: 48
Joined: Fri 25 Aug 2006 02:19

SQLite Database encryption error occurr

Post by ibdac1pro » Tue 21 Jun 2016 05:17

// error code
UniConnection1.Database := 'd:\sqlite.db';
UniConnection1.SpecificOptions.Values['ForceCreateDatabase'] := 'True';
UniConnection1.SpecificOptions.Values['Direct'] := 'True';
UniConnection1.SpecificOptions.Values['EncryptionAlgorithm'] := 'leBlowfish';
UniConnection1.SpecificOptions.Values['EncryptionKey'] := '1111';
UniConnection1.Open;

Error message is 'SQLite function is not linked'

// no error.
UniConnection1.Database := 'd:\sqlite.db';
UniConnection1.SpecificOptions.Values['ForceCreateDatabase'] := 'True';
// UniConnection1.SpecificOptions.Values['Direct'] := 'True';
// UniConnection1.SpecificOptions.Values['EncryptionAlgorithm'] := 'leBlowfish';
// UniConnection1.SpecificOptions.Values['EncryptionKey'] := '1111';
UniConnection1.Open;


What is the problem?

Win7 32 & Delphi 10.1 Berlin & Unidac 6.3.12 & SQLite 3.13.0

Thanks a lot.

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

Re: SQLite Database encryption error occurr

Post by AlexP » Wed 22 Jun 2016 08:46

Hello,

We can't reproduce the issue on the latest version of UniDAC. Please send the full sample and the database file to support*devart*com.

P.S. The latest version of UniDAC uses SQLite 3.12.0 in Direct Mode

ibdac1pro
Posts: 48
Joined: Fri 25 Aug 2006 02:19

Re: SQLite Database encryption error occurr

Post by ibdac1pro » Fri 24 Jun 2016 04:48

Hi,

It failed to solve yet.

Sent the test file.

Thank you.

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

Re: SQLite Database encryption error occurr

Post by AlexP » Mon 27 Jun 2016 07:45

Hello,

We couldn't reproduce the problem on the latest version of UniDAC and Berlin, your sample works with no errors. Please clarify, what application are you developing: VCL or FMX? Also specify the Windows platform (x32/x64), Mac OS X, iOS or Android.

ibdac1pro
Posts: 48
Joined: Fri 25 Aug 2006 02:19

Re: SQLite Database encryption error occurr

Post by ibdac1pro » Mon 27 Jun 2016 14:27

Hi,

I developed the win32 and android app to firemonkey(FMX) at the same time.
That source was not a problem at all in delphi seattle.
However, an error in delphi berlin.

Why I do not know what causes an error in delphi berlin.
In delphi seattle not a problem at all.

Help me.

Thanks a lot.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: SQLite Database encryption error occurr

Post by MaximG » Thu 30 Jun 2016 12:09

We continue testing UniDAC functioning with encrypted data using RAD Studio 10.1 Berlin. We have composed and sent you a small test sample including an application (Win32) compiled in RAD Studio 10.1 Berlin and the source code of this application. Please check whether this application causes any errors? In addition, compile this project in your IDE and check if it works.

ibdac1pro
Posts: 48
Joined: Fri 25 Aug 2006 02:19

Re: SQLite Database encryption error occurr

Post by ibdac1pro » Thu 30 Jun 2016 14:18

Hi,

I not yet received the mail.

My mail is [email protected]

Thanks a lot.

ibdac1pro
Posts: 48
Joined: Fri 25 Aug 2006 02:19

Re: SQLite Database encryption error occurr

Post by ibdac1pro » Fri 01 Jul 2016 04:52

Hi,

What is the path of sqlite3.dll?

Thanks a lot.

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

Re: SQLite Database encryption error occurr

Post by AlexP » Fri 01 Jul 2016 08:24

In Direct Mode

Code: Select all

  UniConnection1.SpecificOptions.Values['Direct'] := 'True';
UniDAC doesn't use the SQLite3.dll library. The obj file compiled from SQLite sources is used in this mode. It is included in our module. So there is no need to specify path to the sqlite3.dll library.

ibdac1pro
Posts: 48
Joined: Fri 25 Aug 2006 02:19

Re: SQLite Database encryption error occurr

Post by ibdac1pro » Fri 01 Jul 2016 10:44

Hi,

I understand.

But compile error occurr.

// This is the code you sent to me.
procedure TForm1.btTouchMeClick(Sender: TObject);
begin
UniConnection1.ProviderName := 'SQLite';
UniConnection1.Database := etDatabase.Text;
UniConnection1.SpecificOptions.Values['ForceCreateDatabase'] := 'True';
UniConnection1.SpecificOptions.Values['Direct'] := 'True';
UniConnection1.SpecificOptions.Values['EncryptionAlgorithm'] := 'leBlowfish';
UniConnection1.SpecificOptions.Values['EncryptionKey'] := '1111';
UniConnection1.Connect;
UniConnection1.ExecSQL('CREATE TABLE IF NOT EXISTS TESTTABLE (ID INTEGER NOT NULL, NAME TEXT)');
UniConnection1.ExecSQL('DELETE FROM TESTTABLE');
UniConnection1.ExecSQL('INSERT INTO TESTTABLE VALUES (100, ''Value 1'')');
UniConnection1.Disconnect;
UniQuery.Close;

UniConnection1.Connect;
UniQuery.SQL.Text := 'Select * From TESTTABLE';
UniQuery.Open;
Memo.Lines.Clear;
Memo.Lines.Add(Format('ID = %s ; Name = %s', [UniQuery.FieldByName('ID').AsString, UniQuery.FieldByName('Name').AsString]));
end;

"SQLite function is not linked"


Delphi 10.1 Berlin, Win32, UniDac 6.3.12

Thanks a lot.

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

Re: SQLite Database encryption error occurr

Post by AlexP » Mon 04 Jul 2016 09:27

In design time open the UniConnection dialog (double-click the component on the form);
select the SQLite provider;
on the Specific Options tab set the Direct option to True;
and try to establish connection by clicking the Connect button.
Let us know the result.

ibdac1pro
Posts: 48
Joined: Fri 25 Aug 2006 02:19

Re: SQLite Database encryption error occurr

Post by ibdac1pro » Sat 16 Jul 2016 09:05

Hi,

I Reinstalled delphi.
OK. No problem.
Sorry.
Thanks a lot.

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

Re: SQLite Database encryption error occurr

Post by AlexP » Mon 18 Jul 2016 06:20

Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.

Post Reply