You are not logged in.
Hi,
maybe I miss something but for simple code like:
FModel := TSQLModel.Create([TExampleData]);
FServer := TSQLRestServerDB.Create(FModel, ':memory:');
FServer.CreateMissingTables;
FProp := TSQLDBSQLite3ConnectionProperties.Create(FServer.DB);
for I := 0 to 3 do
with FProp.Execute('select count(*) from ExampleData', []) do
begin
if Step(true) then
WriteLn(ColumnInt(0));
end;
I got error: "TSQLDBSQLite3Statement.Step(SeekFirst=true) not implemented for simple". Any ideas?
Last edited by hnb (2017-09-08 19:31:43)
best regards,
Maciej Izak
Offline
As the error says, Step(true) is not implement by TSQLDBSQLite3Statement.
Why are you using the database as external?
Directly use the SQLite3 engine.
It will handle the Step(true) as expected.
Offline
What is strange - it works for few calls. I have error only for i = 2 or for i = 3 (it depends on TSQLRecord)... SQLite is used as external database because I need to use ISQLDBRows.
Last edited by hnb (2017-09-08 22:39:47)
best regards,
Maciej Izak
Offline
What I did is simply modify a couple lines in SynDBSQLite3:
// Around lines 775-780...
if SeekFirst then begin
(* if fCurrentRow>0 then
raise ESQLDBException.CreateUTF8('%.Step(SeekFirst=true) not implemented',[self]); *)
fCurrentRow := 0;
//fStatement.Reset;
end;
It's been working fine for me.
Offline