The following sql statement works fine when the target is Win32, but when I target Android I get:exception class ESQLiteError with message 'near "WITH": syntax error'.
sql.Add('WITH RECURSIVE EntityTree("EntityID", "Type", "ParentID") AS( ');
sql.Add(' SELECT "EntityID", "Type", "ParentID" ' );
sql.Add(' FROM "tblEntity" ');
sql.Add(' WHERE "EntityID" = ' + IntToStr(CurEntity.EntityID) + ' ' );
sql.Add('UNION ');
sql.Add(' SELECT e."EntityID", e."Type", e."ParentID" ');
sql.Add(' FROM "tblEntity" e ');
sql.Add(' JOIN EntityTree et ON (et."EntityID" = e."ParentID")');
sql.Add(') ');
sql.Add('SELECT Count("EntityID") As CountOfUnits FROM EntityTree ');
sql.Add('WHERE "Type" in (4, 5, 7, 10, 13, 16, 19, 21, 23) ');
with statement error when targeting android
Re: with statement error when targeting android
Hello,
This functionality was added in the SQLite version 3.8.3: http://www.sqlite.org/releaselog/3_8_3.html . Your Android device has probably an older SQLite library.
This functionality was added in the SQLite version 3.8.3: http://www.sqlite.org/releaselog/3_8_3.html . Your Android device has probably an older SQLite library.