Problem on Connect with an Android project

Discussion of open issues, suggestions and bugs regarding LiteDAC (SQLite Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jenswahl
Posts: 1
Joined: Fri 22 Apr 2022 07:50

Problem on Connect with an Android project

Post by jenswahl » Fri 22 Apr 2022 07:55

Hello,

I am using LiteDac version 5.1 with Delphi 11.1. My problem is that when developing an application for Android32, the database path is implicitly changed when connecting:
LiteConnection1.Database := 'MyDB.db';
LiteConnection1.Connect: Here comes an error:

EFOpenError: the file "data/user/0/com.embarcadero.MyProject/files/MyDB.db" cannot be opened. No such directory or file!

If I enter an absolute path for the Database property, the path mentioned in the error message is put in front of it anyway.
Under Windows this problem does not exist. Used Android version: 11.

What have I to change?

Thanks,

Jens

Post Reply