When using LiteDac in direct-mode and including MSACCESS in uses clause results in access violation running on OSX 10.13.2 when trying to create a SQLite table:
Code: Select all
unit UTest;
interface
uses
  System.SysUtils,
  System.Types,
  System.UITypes,
  System.Classes,
  System.Variants,
  System.IOUtils,
  FMX.Types,
  FMX.Controls,
  FMX.Forms,
  FMX.Graphics,
  FMX.Dialogs,
  FMX.Controls.Presentation,
  FMX.StdCtrls,
  Data.DB,
  LiteCall,
  LiteConsts,
  DAScript,
  LiteScript,
  LiteAccess,
  DBAccess,
  {
  I need SDAC SQL-Server-Access together with LiteDAC with direct-mode and Encryption.
  Errors:
  - OSX 10.13.2 Including MSAccess causes an "access violation" when direct-Mode = true.
  - IOS-Simulator 10.3.1 shows message "Feature is not supported"
  - IOS-Simulator 11.01 and 11.2 probably not supported by Embarcadero Tokyo 10.2.2
  }
  // INCLUDING MSACCESS RESULT IN ACCESS VIOLATION
  MSAccess;
type
  TFTest = class(TForm)
    Button1         : TButton;
    LiteConnection1 : TLiteConnection;
    LiteScript1     : TLiteScript;
    procedure Button1Click(Sender: TObject);
    procedure LiteConnection1AfterConnect(Sender: TObject);
  end;
var
  FTest: TFTest;
implementation
{$R *.fmx}
procedure TFTest.Button1Click(Sender: TObject);
begin
  LiteConnection1.LoginPrompt                 := false;
  LiteConnection1.Options.ForceCreateDatabase := true;
  // "Feature not supported" occurs on IOS 10.3.1 Simulator when direct = true
  LiteConnection1.Options.Direct              := true;
  LiteConnection1.EncryptionKey               := 'test';
  LiteConnection1.Options.EncryptionAlgorithm := leBlowfish;
  LiteConnection1.Database                    := TPath.Combine(TPath.GetDocumentsPath, 'test.db3');
  LiteConnection1.Connected                   := true;
end;
procedure TFTest.LiteConnection1AfterConnect(Sender: TObject);
begin
  LiteScript1.SQL.text := 'create table if not exists test (ID int, Match Varchar(10))';
  // Access violation in OSX 10.13.2 occurs when script is executed and direct = true 
  // and MSACCESS included
  LiteScript1.Execute;
end;
end.
OSX 10.13.2
XCode 9.2
IOS Simulators 10.3.1 / 11.0.1 / 11.2
WIN 10 Prof
EMB Delphi 10.2.2 Tokyo Enterprise
DEVART SDAC 8.03
DEVART LiteDAC 3.1.3
Thanks for help,
Dietrich