SQL Command with Parameters, Loop?
Posted on 2006-05-01
I am using Several SQL Commands, all of which have parameters:
Command1.Parameters("@param1").Value = "test"
I want to be able to run these commands more than once by using a loop....First pass thru runs fine, but then when it tries to loop I get the following error:
"The variable name '@param1' has already been declared. Variable names must be unique within a query batch or stored procedure."
How can I reset these so I can loop thru and run the same commands with the parameters reset ? Thanks for all your help !