Forum > Android

Next doesn't work in Android Arm v7a

(1/1)

dseligo:
I successfully use Zeos with LAMW (FPC 3.2.2) and Sqlite for Android Aarch64 target (using binaries for Android from sqlite.org).

But when target is ARM v7a (armeabi), 'Next' and 'Prior' methods of TZQuery doesn't work. 'First' and 'Last' does work (correction: Last does something, but not exactly what is expected).

I use Zeos version 7.2.4, but I also tried with 8.0.0. stable and current trunk.
I tried several Sqlite versions, from 3.47.0 to 3.25.0.

I create table and test data with:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---SQL.Text :=  'create table if not exists mytable ' +  '(' +  'id integer not null, ' +  'value integer, ' +  'primary key (id)' +  ')';ExecSQL; SQL.Text := 'insert into mytable (id, value) values (1, 100)';ExecSQL;SQL.Text := 'insert into mytable (id, value) values (2, 200)';ExecSQL;SQL.Text := 'insert into mytable (id, value) values (3, 300)';ExecSQL;
Then I test with following code:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TAndroidModule1.btnNextTestClick(Sender: TObject);var i: Integer;   procedure PrintLine(const AText: String);  var sEOF: String;  begin    If ZQry.EOF then      sEOF := 'true'    else      sEOF := 'false';     edLog.Append(      AText + ': ID = ' + ZQry.FieldByName('id').AsString +', value = ' +      ZQry.FieldByName('value').AsString + ', RecNo: ' + ZQry.RecNo.ToString +      ', EOF: ' + sEOF + #13#10);  end; begin  With ZQry do  begin    Close;    SQL.Text := 'select count(*) from mytable';    Open;    edLog.Append('Count: ' + IntToStr(Fields[0].AsInteger) + #13#10);     Close;    SQL.Text := 'select id, value from mytable';    Open;     i := 0;    While (not Eof) and (i < 5) do    begin      inc(i);      PrintLine('Loop ' + i.ToString);      Next;    end;     Last;    PrintLine('Last');     Prior;    PrintLine('Prior');     First;    PrintLine('First');  end;end;
And this is result:

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Count: 3Loop 1: ID = 1, value = 100, RecNo: 1, EOF: falseLoop 2: ID = 1, value = 100, RecNo: 1, EOF: falseLoop 3: ID = 1, value = 100, RecNo: 1, EOF: falseLoop 4: ID = 1, value = 100, RecNo: 1, EOF: falseLoop 5: ID = 1, value = 100, RecNo: 1, EOF: falseLast: ID = , value = , RecNo: 4, EOF: truePrior: ID = , value = , RecNo: 4, EOF: trueFirst: ID = 1, value = 100, RecNo: 1, EOF: false
This are expected results (I got this with Aarch64 target):

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Count: 3Loop 1: ID = 1, value = 100, RecNo: 1, EOF: falseLoop 2: ID = 2, value = 200, RecNo: 2, EOF: falseLoop 3: ID = 3, value = 300, RecNo: 3, EOF: falseLast: ID = 3, value = 300, RecNo: 3, EOF: truePrior: ID = 2, value = 200, RecNo: 2, EOF: falseFirst: ID = 1, value = 100, RecNo: 1, EOF: false
Does anybody have clue what could be culprit?

Thank you.

P.S.: I will also post this in Zeoslib portal and report here if somebody there has a solution.

Navigation

[0] Message Index

Go to full version