Whether should TUniQuery clear properties at SQL change?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Alexander_73
Posts: 52
Joined: Mon 24 Mar 2008 13:22

Whether should TUniQuery clear properties at SQL change?

Post by Alexander_73 » Fri 22 Apr 2011 10:08

I create an object of TUniQuery, I set properties:

Code: Select all

var
   Q : TUniQuery;
begin
  Q:=TUniQuery.Create(nil);
  try
    Q.Connection:=MSAcsConnect;
    Q.SQL.Text:='SELECT * FROM Table1';
    Q.UpdatingTable:='Table1';
    Q.KeyFields:='Table1ID';
    Q.Open;
    try
      Q.Insert;
       ...
   finally
     Q.Close
   end;
   Q.SQL.Text:='SELECT * FROM Table2';
   // Why on this place do not to clear properties UpdatingTable&KeyFields, the query SQL is changed?
    ....
  finally
    Q.Free
 end
end;
Why on selected place do not to clear properties UpdatingTable&KeyFields automatically, if the query SQL is changed?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 22 Apr 2011 12:03

Hello,

We don't clear any properties that are set by user.
You should manually clear all properties that you have changed.

Alexander_73
Posts: 52
Joined: Mon 24 Mar 2008 13:22

Post by Alexander_73 » Fri 22 Apr 2011 12:13

It is a pity :). Thanks.

Post Reply