How to Reload dml uniquery.

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
sounobre
Posts: 1
Joined: Mon 14 May 2018 17:11

How to Reload dml uniquery.

Post by sounobre » Mon 14 May 2018 17:23

Good afternoon!
After I use uniquery.sql.clear, would I have some way to give it a reload in the original uniquery?

Example:

Delphi
uniqueryTest object is equal to "select * from table1"

uniqueryTest.close;
uniqueryTest.clear;
uniqueryTest.sql.text: = 'select * from table2';

Is there any command I use that returns the uniqueryTest object to its original state, "select * from table1"?

Thank you.

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: How to Reload dml uniquery.

Post by azyk » Tue 15 May 2018 09:48

The TUniQuery component does not store the history of the executed SQL queries. You can store this history yourself using the onSQL event handler of the TUniSQLMonitor component. For example:

Code: Select all

procedure TForm1.UniSQLMonitor1SQL(Sender: TObject; Text: string;
  Flag: TDATraceFlag);
begin
  ...
  Memo1.Lines.Add(Text);
  ...
end;
More information about TUniSQLMonitor in our online documentation:
https://www.devart.com/unidac/docs/deva ... onitor.htm

Post Reply