Groups | Blog | Home
all groups > dotnet ado.net > october 2004 >

dotnet ado.net : insert multiple rows using loop


vrush desh via .NET 247
10/31/2004 3:54:03 AM
(Type your message here)
Hi,
I am trying to insert multiple rows using 'for' loop.
It inserts first row but while inserting second row it gives error like
"The variable name @name already declared. Variable names must be unique within a query batch or
stored procedure"

Please help me...my email id is vrushalid@gmail.com
--------------------------------
From: vrushali deshpande

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

future
10/31/2004 7:49:03 AM


[quoted text, click to view]
future
10/31/2004 7:53:01 AM
Hi,
ep u were declaring the local variable inside the for loop just
declare it outside the FOR looop thn everythin works fine..
BestWishes,
Grzegorz Danowski
10/31/2004 2:36:33 PM
Uzytkownik "vrush desh via .NET 247" <anonymous@dotnet247.com> napisal w
wiadomosci news:%231UYSB0vEHA.200@TK2MSFTNGP11.phx.gbl...
[quoted text, click to view]

Please post your code...
Grzegorz
AddThis Social Bookmark Button