SQLite on Android

Forum related to SQLite

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Alan
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 15.01.2024, 02:56

SQLite on Android

Post by Alan »

Hi

I'm using D12 with Zeos v8 from GitHub.

I followed the instructions using the instructions in this thread:

viewtopic.php?f=21&t=144978&p=178717&hi ... id#p178717

However I'm getting the error:
Project TestZeosAndroidFMX.apk raised exception class EOSError with message 'System Error. Code: 11.
Try again'.

Its the same on Android 32 & 46

My code is:
function ConnectDB:Boolean;
var
DbLocation: string;
LibLocation: string;
begin
Result:= False;
LibLocation:= TPath.Combine(TPath.GetDocumentsPath, 'libsqliteX.so');
if FileExists(LibLocation) then
ZConnection1.LibraryLocation := LibLocation;
DbLocation := TPath.Combine(TPath.GetDocumentsPath, 'Test.db');
if FileExists(DbLocation) then
ZConnection1.Database := DbLocation;

ZConnection1.Protocol := 'sqlite';
ZConnection1.ClientCodepage := 'UTF-8';
ZConnection1.Connected := true;

Result:= True;
end;

Thanks

Alan
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: SQLite on Android

Post by marsupilami »

Hello Alan,

I added an example to the Zeos SVN. Please update and test if the example works for you.

With best regards,

Jan
Post Reply