problème avec ajout, suppression et modification
bonjour,
je ne sais pas pourquoi j'ai des problèmes avec ces opérations qui s'averent evidentes :?
voilà le code par exemple que je mets sur le boutton "modifier" :
Code:
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 |
merci d'avance de votre aide..