IDBResultset, TDataset, Connection

Instead of calling ExecuteQuery, you can cast IDBStatement to IDBDatasetStatement, and use GetDataset and Open to execute it:



var 
  Stmt: IDBStatement;
  Dataset: TDataset;
begin
  {...}
  Dataset := (Stmt as IDBDatasetStatement).GetDataset;
  Dataset.Open;
  // Use Dataset as TDataset normally here
end;

Wagner R. Landgraf2018-05-09 13:12:37

1 Like