unitable takes too long to refres

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Senad
Posts: 34
Joined: Tue 10 Dec 2013 08:07

unitable takes too long to refres

Post by Senad » Mon 17 Aug 2015 13:27

When I run this query :

Code: Select all

procedure TForm2.cxButton1Click(Sender: TObject);
begin
if (cxLookUpComboBox1.Text = '') or (cxTextEdit1.Text='') then begin
ShowMessage('Niso vpisani vsi potrebni podatki.');
abort;
end else begin
DataModule3.UniQuery2.Close;
DataModule3.UniQuery2.SQL.Clear;
DataModule3.UniQuery2.SQL.Text := ' insert into POSOJA (DVD_ID,OSEBA,DATUM_POSOJE) VALUES (:a1,:a2,:a3)';
DataModule3.UniQuery2.Params.ParamByName('a1').asString := cxLookUpComboBox1.Text;
DataModule3.UniQuery2.Params.ParamByName('a2').asString := cxTextEdit1.Text;
DataModule3.UniQuery2.Params.ParamByName('a3').AsDateTime := Now();
DataModule3.UniQuery2.ExecSQL;

DataModule3.UniQuery2.Close;
DataModule3.UniQuery2.SQL.Clear;
DataModule3.UniQuery2.SQL.Text := 'update filmi set na_voljo=0 where dvd_id=:a1';
DataModule3.UniQuery2.Params.ParamByName('a1').asString := Form2.cxLookupComboBox1.Text;
DataModule3.UniQuery2.ExecSQL;

end;
DataModule3.UniQuery1.Refresh;
DataModule3.UniTable2.Refresh;
DataModule3.UniTable1.Refresh;
end;
It takes 3-4 seconds to execute. The problem, it seems is in the last line
DataModule3.UniTable1.Refresh;
The table refreshing takes too much time (it contains about 2000 records).
Is this normal ?
This is an SQLite database.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: unitable takes too long to refres

Post by MaximG » Tue 18 Aug 2015 08:17

Unfortunately, we couldn't check the performance of UniTable.Refresh using the provided code. For the following investigation, please send us a small example that demonstrates the problem, including a test DB. You can send to maximg*devart*com

Post Reply