Board index » delphi » TQuery.SQL.Clear does not work, any fixes?

TQuery.SQL.Clear does not work, any fixes?

I have discovered that the TQuery.SQL.Clear method does not seem to work
properly.  I want to use the same query object and just reload the query
text.  When the SQL.Clear method is called the SQL.Count drops to zero
like it should, then as I SQL.Add lines it increases, but the original
strings from the original query appear in the query!  Anything wrong here?
Any possible fixes?

;)
Andrew

 

Re:TQuery.SQL.Clear does not work, any fixes?


Quote
A.Sla...@pi.CSIRO.AU (AndrewSlater) wrote:
>I have discovered that the TQuery.SQL.Clear method does not seem to work
>properly.  I want to use the same query object and just reload the query
>text.  When the SQL.Clear method is called the SQL.Count drops to zero
>like it should, then as I SQL.Add lines it increases, but the original
>strings from the original query appear in the query!  Anything wrong here?
>Any possible fixes?

>;)
>Andrew

Did you do TQuery1.Close; first before the "Clear"?

Peter

Other Threads