[Mac OS X]UniDac 6.1.6 Encryption causes Runtime-Error 231

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
DerPhilip
Posts: 3
Joined: Thu 30 Jul 2015 13:26

[Mac OS X]UniDac 6.1.6 Encryption causes Runtime-Error 231

Post by DerPhilip » Thu 30 Jul 2015 13:30

Hello,

trying to work with an encrypted sqlite-Database in OS X doesn't work anymore since today (???)...

Here is some code, using Delphi XE8 Update 1 (subscription)

Code: Select all

unit Unit2;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
  Uni, UniProvider, SQLiteUniProvider, FMX.Controls.Presentation, FMX.StdCtrls;

type
  TForm2 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form2: TForm2;
  uniconnection: TUniConnection;
  uniquery: TUniQuery;

implementation

{$R *.fmx}

procedure TForm2.Button1Click(Sender: TObject);
var
  dbFile:String;
begin
  uniconnection := TUniConnection.Create(nil);
  uniconnection.ProviderName := 'SQLite';
  uniconnection.SpecificOptions.Values['Direct'] := 'True';

  uniconnection.SpecificOptions.Values['EncryptionAlgorithm'] := 'leAES256';
  uniconnection.SpecificOptions.Values['EncryptionKey'] := 'TesttestTEST';
  uniconnection.SpecificOptions.Values['ForceCreateDatabase'] := 'True';


  {$IFDEF MacOS}
  ForceDirectories(GetHomePath + PathDelim +'Documents' + PathDelim + 'unidacTest');
  {$ENDIF}

  dbFile := {$IFDEF MSWindows}ExtractFileDir(ParamStr(0))+'\sqliteDb.sqlite';{$ENDIF}
            {$IFDEF MACOS}GetHomePath +PathDelim +'Documents'+ PathDelim + 'unidacTest'+ PathDelim +'sqliteDb.sqlite';{$ENDIF}

  uniconnection.Database := dbFile;
end;

procedure TForm2.Button2Click(Sender: TObject);
begin
  uniconnection.Connect;
  uniquery := TUniQuery.Create(nil);
  uniquery.Connection := uniconnection;
  uniquery.SQL.Text := 'CREATE TABLE test (testId, int)';
  uniquery.ExecSQL;
end;

end.
Looking forward for response, thanks!

Philip

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

Re: [Mac OS X]UniDac 6.1.6 Encryption causes Runtime-Error 231

Post by MaximG » Fri 31 Jul 2015 10:17

Thank you for the information. We have reproduced the issue, and we will inform you about the results shortly

Geoputer
Posts: 1
Joined: Wed 08 Mar 2017 04:48

Re: [Mac OS X]UniDac 6.1.6 Encryption causes Runtime-Error 231

Post by Geoputer » Wed 08 Mar 2017 04:55

Was this issue resolved? I am running RAD Studio 10.2 and still having a problem with Runtime Error 231 on the Mac OS X side. Windows 64 runs perfectly on a VMWare virtual machine...

The app builds fine and begins to run, and I get through your Server sign-on dialog (UniConnectDlgFMX), but then the app just crashes without any warning, before any forms show up. I'm running MySQL on a remote server...on the same network.

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

Re: [Mac OS X]UniDac 6.1.6 Encryption causes Runtime-Error 231

Post by MaximG » Tue 14 Mar 2017 14:48

We have reproduced the problem and fixed the bug. The fix will be included in the next UniDAC build.

Post Reply