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 ParamCheck
is true and the text is not empty) or cleared (if the text is empty).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With