G
Guest
I am having a function which accepts Database parameter array, and it
inserts to the database inside a loop.
Note:
inside the loop i am changing the values of the parameter array .
it works fine if the loop executes for only one time, but if the loop
executes more than one time i am getting the error : "field xyz is already
contained by another SqlParameterCollection"
Function abc(Parameter_Array)
begin loop
alter Parameter_Array' values
Create command object
Add parameters to the command object //i am getting
error at this point,if this is executed for the second time .
Execute
command.parameters.close();
set connection,command etc.. to null
end
inserts to the database inside a loop.
Note:
inside the loop i am changing the values of the parameter array .
it works fine if the loop executes for only one time, but if the loop
executes more than one time i am getting the error : "field xyz is already
contained by another SqlParameterCollection"
Function abc(Parameter_Array)
begin loop
alter Parameter_Array' values
Create command object
Add parameters to the command object //i am getting
error at this point,if this is executed for the second time .
Execute
command.parameters.close();
set connection,command etc.. to null
end