Hi to all,
I want to execute same query atleast 5 times with different options.
so I execute datareader in while loop.
let considetr opt1 is my variable name passing to command.
when while loop in second iteration then it gives me error that
"The variable name '@opt1' has already been declared. Variable names must be unique within a query batch or stored procedure."
what is solution?
or may I write any code that gives me same result..?
I just want to fetch a column value for 5 different options given by user. In short 5 SELECT statement in single statement"
please reply!