Delphi ADO: need to clear the parameters?

Suppose I have a TADOQuery object that I use for various purposes in my program. Do I need to explicitly clear the parameters when I'm done? Or does this happen automatically when I clear SQL? eg.

  adoGenericQuery.SQL.Text := '';
  adoGenericQuery.Parameters.Clear; // <- Is this redundant?
+3
source share
1 answer

You do not need to manually clear the parameters. When an SQL text is assigned, the query is first closed; if it is active, the parameters are either initialized (if it ParamCheckis true and the text is not empty) or cleared (if the text is empty).

+8
source

Source: https://habr.com/ru/post/1789304/


All Articles