for BDE, we can clear the param data like below.
with tstoredproc do
begin
.
.
for i := 0 to ParamCount - 1 do Params[i].Clear;
.
.
end
how to do the same for ADO Dataset's? I do not want to create params. i am using TADOStoredProc component and it is having all the params. i Just need to clear data and assign new data.
with TADoStoredProc do
begin
.
.
for i := 0 to ParamCount - 1 do Parameters[i].Value := null; -- is this right? or can i use below line of code
Parameters.Refresh
.
.
end;
BDE TParam.Clear sets Unassigned for the data member of the parameter.
i Just need to clear data and assign new data
Why do you need to clear the data/value in the first place? simply assign the new values.
If you need to explicitly pass null to the stored procedure parameter you can use e.g.
Parameters[i].Value := Unassigned
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