1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| command.CommandText = "select ref_produit from produit where nom='" & Me.pro1.Text & "'"
Dim re As OleDbDataReader
re = command.ExecuteReader
While re.Read
command.CommandText = "Insert into commander values ('" & re.GetString(0) & "','" & centre & "','" & s1.Text & "','" & c1.Text & "','" & val & "','" & p1.Text & "','" & dates & "','" & num & "')"
End While
re.Close()
command.ExecuteNonQuery()
command.CommandText = "select ref_produit from produit where nom='" & Me.pro1.Text & "'"
Dim re1 As OleDbDataReader
re1 = command.ExecuteReader
While re1.Read
command.CommandText = "Insert into commander values ('" & re1.GetString(0) & "','" & centre & "','" & s2.Text & "','" & c2.Text & "','" & val & "','" & p2.Text & "','" & dates & "','" & num & "')"
End While
re1.Close()
command.ExecuteNonQuery() |
Partager