I would like to insert records a user selects from a gridview using check box column here is my code which inserts the first record then on the second interation it gives the error
"The variable name '@Customer' has already been declared. Variable names must be unique within a query batch or stored procedure."
Public Sub SelectCusListTable() Dim cnx As Data.SqlClient.SqlConnection = SqlCnxJPF.SourceDB Dim cmdSC = New Data.SqlClient.SqlCommand("insert into selectcus (customer)" & "values (@customer)", (cnx)) Dim daSC As New SqlClient.SqlDataAdapter() Dim dsSC As New DataSet()
Dim c As String
For n As Integer = 0 To DataGridView1.Rows.Count - 1
If CBool(DataGridView1.Rows(n).Cells("selected").Value) = True Then