1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| Try
Dim cmd As New OleDb.OleDbCommand
cmd.Connection = conn
cmd.CommandType = CommandType.Text
cmd.CommandText = "INSERT INTO organisme(nom_org,adresse,telephone,fax)" & _
"values ('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "') "
conn.Open()
cmd.ExecuteNonQuery()
dtadapt.Update(ds, "salle")
dtadapt.Fill(ds, "salle")
conn.Close()
MsgBox("Ajout bien fait", MsgBoxStyle.OkOnly, "confirmation")
Me.Close()
Catch ex As Exception
Exit Sub
End Try |
Partager