#1 2017-09-08 19:16:36

hnb
Member
Registered: 2015-06-15
Posts: 290

Error: TSQLDBSQLite3Statement.Step(SeekFirst=true) not implemented

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

#2 2017-09-08 19:41:57

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: Error: TSQLDBSQLite3Statement.Step(SeekFirst=true) not implemented

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

#3 2017-09-08 20:00:46

hnb
Member
Registered: 2015-06-15
Posts: 290

Re: Error: TSQLDBSQLite3Statement.Step(SeekFirst=true) not implemented

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

#4 2017-09-10 09:20:13

jbroussia
Member
From: France
Registered: 2011-04-09
Posts: 74

Re: Error: TSQLDBSQLite3Statement.Step(SeekFirst=true) not implemented

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

#5 2017-09-10 12:20:37

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: Error: TSQLDBSQLite3Statement.Step(SeekFirst=true) not implemented

Probably with a resource leak.

This code was disabled because it was untested.

Offline

Board footer

Powered by FluxBB