#1 2017-01-31 12:35:33

noobies
Member
Registered: 2011-09-13
Posts: 139

Add RowCount to TSQLDBStatement

ab, can u add RowCount, i want get rowcount from select like

  qry := database_oledb.MainConnection.NewStatementPrepared(sql, True);
  qry.ExecutePreparedAndFetchAllAsJSON(false, buf);
  i := qry.RowCount;

i small modifity source by add RowCount like ColumnCount

ISQLDBRows = interface
...
function RowCount: integer;
...


TSQLDBStatement = class(TInterfacedObject, ISQLDBRows, ISQLDBStatement)
...
fRowCount: integer;
...
function RowCount: integer;   
...
function TSQLDBStatement.RowCount: integer;
begin
  if self=nil then
    result := 0 else
    result := fTotalRowsRetrieved;
end;

Last edited by noobies (2017-01-31 12:53:04)

Offline

Board footer

Powered by FluxBB