4

With Delphi 10.4 I get an error in my Android App (same error for both 32bit and 64bit).

[FireDAC][Phys][SQLite]-314. Cannot load vendor library [libsqlite.so or libdb_sql.so]. Hint: check it is in the PATH or application EXE directories, and has x86 bitness.

It has worked fine in previous versions of Delphi (latest 10.3.3).

Is it at bug, or has something changed with Delphi 10.4?


constructor TBrDataAccess.Create;
var
  AppDataName: string;
  DBExists: boolean;
begin
  try
    FFDGUIxProvider := 'Console';

    AppDataName := TPath.GetDocumentsPath + PathDelim + GetFileName;

    DBExists := FileExists(AppDataName);

    FConnection:=TFDConnection.Create(nil);
    FConnection.Params.Add('DriverID=SQLite');
    FConnection.Params.Add('Database=' + AppDataName);
    FConnection.Params.Add('OpenMode=CreateUTF8');
    FConnection.Params.Add('DateTimeFormat=String');
    FConnection.Params.Add('LockingMode=Normal');
    FConnection.Params.Add('Synchronous=Normal');
    FConnection.Params.Add('BusyTimeout=7500');
    FConnection.Params.Add('SharedCache=False');

    FConnection.FetchOptions.Mode := fmAll;  // Meget vigtig ved SqLite.

    FConnection.UpdateOptions.LockWait := True;
    FConnection.Connected := true;

    if not DBExists
    then if FConnection.ExecSQLScalar('pragma schema_version;') = 0
    then CreateDb;
  except
    on E : Exception
    do TBrMobileLog.AddLog(TBrLogFileType.LFTDb, 'TBrDataAccess', 'Create', E.Message, True);
  end;
end;
1
  • 4
    Try to include FireDAC.Phys.SQLiteWrapper.Stat unit into uses clause. Commented May 29, 2020 at 14:17

1 Answer 1

10

Try to include FireDAC.Phys.SQLiteWrapper.Stat unit into uses clause. Thank you so much da-soft. Now Sqlite works under Android x64.

Sign up to request clarification or add additional context in comments.

2 Comments

notes that must declare before all FD uses units.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.