Suppose I have a TADOQuery object that I reuse for different purposes in my program. Do I need to explicitly clean up the parameters when I’m done? Or does that happen automagically when I clear the SQL? e.g.
adoGenericQuery.SQL.Text := '';
adoGenericQuery.Parameters.Clear; // <- Is this redundant?
You don’t need to clear the parameters manually. When the SQL text is assigned, first the query is closed if it is active, then the parameters are either initialized (if
ParamCheckis true and the text is not empty) or cleared (if the text is empty).