السلام عليكــم ورحمـة الله وبركاتــه ،،
Dim Sql As String
Dim cmd As New SqlCommand
con.Open()
com.ExecuteNonQuery()
con.Close()
Dim i As Int32
Dim command As New SqlCommand
command.Connection = con
con.Open()
For i = 0 To DataGridView2.Rows.Count - 1
Sql = "INSERT INTO Sales VALUES(" & salesidLabel.Text & "," & Me.Label10.Text & "," & dateLabel.Text & "," & Convert.ToString(DataGridView2.Rows(i).Cells("Column10").Value) & "," & Convert.ToString(DataGridView2.Rows(i).Cells("Column5").Value) & "," & Convert.ToString(DataGridView2.Rows(i).Cells("Column7").Value) & "," & Me.ComboBox1.Text & ")"
command.CommandText = Sql
command.ExecuteNonQuery()
Next
con.Close()
MessageBox.Show("All Information have been saved successfully", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information)عندي ارور في هذي الكود و مو عارفه اعدله ؟؟