1 2 3 4 5 6 7 8
| Try
'insertion dans le table compteur
com = New SqlCommand("insert into ANOMR(N_ORD_ECO,SOUS_QUART,CIL,QUART,NOM_CLT,AV_ACC,PORTE,RUE,N_CPT_DEPO,N_SERIE,DER_IND_LU,TP_CAL,MAR_DEPO,DATE_DEPO,ANOM,AG)values('" & ComboBox1.SelectedItem & "','" & Replace(TextBox1.Text, "'", " ", 1, vbTextCompare) & "','" & Val(TextBox2.Text) & "','" & Replace(TextBox3.Text, "'", " ", 1, vbTextCompare) & "','" & Replace(TextBox4.Text, "'", " ", 1, vbTextCompare) & "','" & Replace(TextBox5.Text, "'", " ") & "','" & Val(TextBox6.Text) & "','" & Replace(TextBox7.Text, "'", " ", 1, vbTextCompare) & "','" & Val(TextBox8.Text) & "','" & Val(TextBox9.Text) & "','" & Val(TextBox10.Text) & "','" & Val(TextBox11.Text) & "','" & TextBox12.Text & "','" & d & "','" & ComboBox2.SelectedItem & "','" & ComboBox3.SelectedItem & "');", con)
com.ExecuteNonQuery()
MsgBox("Anomalie enregistrée", MsgBoxStyle.OkOnly)
Catch ex As Exception
MsgBox("Erreur d'insertion des données:" & ex.ToString)
End Try |
Partager