Click here to Skip to main content
16,005,038 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Tabbing through datalist items Pin
MacIntyre30-Jul-09 12:24
MacIntyre30-Jul-09 12:24 
AnswerRe: Tabbing through datalist items Pin
Hemant_ec4830-Jul-09 11:40
Hemant_ec4830-Jul-09 11:40 
GeneralRe: Tabbing through datalist items Pin
MacIntyre30-Jul-09 12:24
MacIntyre30-Jul-09 12:24 
Questionasp:ImageButton and Firefox Pin
Hristiyan30-Jul-09 10:31
Hristiyan30-Jul-09 10:31 
AnswerRe: asp:ImageButton and Firefox Pin
Christian Graus30-Jul-09 10:46
protectorChristian Graus30-Jul-09 10:46 
GeneralRe: asp:ImageButton and Firefox Pin
Hristiyan30-Jul-09 10:54
Hristiyan30-Jul-09 10:54 
GeneralRe: asp:ImageButton and Firefox Pin
Christian Graus30-Jul-09 11:35
protectorChristian Graus30-Jul-09 11:35 
QuestionPlaceholder Pin
comp_j30-Jul-09 10:15
comp_j30-Jul-09 10:15 
Hello


Im must read records from Gridview and then insert them to database.
Here is the code that I wrote.


 <br />
for (int i = 0; i<counter; i++)  <br />
        {<br />
            string ID = GridView.Rows[i].Cells[0].Text;<br />
           objDataAdapter.SelectCommand.CommandText = "INSERT INTO MYTable " +<br />
            "(Name) VALUES(@Name)";<br />
            objDataAdapter.SelectCommand.Parameters.AddWithValue("@Name",Name);<br />
}<br />


There is an exception:
The variable name '@Name' has already been declared. Variable names must be unique within a query batch or stored procedure.

Please help me how can I handle this exception.
AnswerRe: Placeholder Pin
Christian Graus30-Jul-09 10:49
protectorChristian Graus30-Jul-09 10:49 
GeneralRe: Placeholder Pin
comp_j30-Jul-09 11:16
comp_j30-Jul-09 11:16 
GeneralRe: Placeholder Pin
Christian Graus30-Jul-09 11:35
protectorChristian Graus30-Jul-09 11:35 
GeneralRe: Placeholder Pin
comp_j30-Jul-09 12:17
comp_j30-Jul-09 12:17 
GeneralRe: Placeholder Pin
Christian Graus30-Jul-09 12:28
protectorChristian Graus30-Jul-09 12:28 
QuestionViewState Probelm in GridView Pin
Hemant_ec4830-Jul-09 9:37
Hemant_ec4830-Jul-09 9:37 
AnswerRe: ViewState Probelm in GridView Pin
Christian Graus30-Jul-09 10:50
protectorChristian Graus30-Jul-09 10:50 
GeneralRe: ViewState Probelm in GridView Pin
Hemant_ec4830-Jul-09 11:32
Hemant_ec4830-Jul-09 11:32 
GeneralRe: ViewState Probelm in GridView Pin
Christian Graus30-Jul-09 11:36
protectorChristian Graus30-Jul-09 11:36 
QuestionDynamic link button controls Pin
Ersan Ercek30-Jul-09 8:03
Ersan Ercek30-Jul-09 8:03 
AnswerRe: Dynamic link button controls Pin
Abhijit Jana30-Jul-09 8:12
professionalAbhijit Jana30-Jul-09 8:12 
GeneralRe: Dynamic link button controls Pin
Ersan Ercek30-Jul-09 8:20
Ersan Ercek30-Jul-09 8:20 
GeneralRe: Dynamic link button controls Pin
Abhijit Jana30-Jul-09 8:26
professionalAbhijit Jana30-Jul-09 8:26 
GeneralRe: Dynamic link button controls Pin
Ersan Ercek30-Jul-09 8:27
Ersan Ercek30-Jul-09 8:27 
GeneralRe: Dynamic link button controls Pin
Abhijit Jana30-Jul-09 9:01
professionalAbhijit Jana30-Jul-09 9:01 
GeneralRe: Dynamic link button controls Pin
Ersan Ercek30-Jul-09 9:17
Ersan Ercek30-Jul-09 9:17 
GeneralRe: Dynamic link button controls Pin
Ersan Ercek30-Jul-09 9:28
Ersan Ercek30-Jul-09 9:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.