i have an error in a Button click :
Dim ConStr As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source = C:\Users\amine\Documents\projet.mdb"
Dim Conn As New OleDbConnection(ConStr)
Dim Save As New OleDbCommand("INSERT INTO Client(Nom,Prenom,Adresse,Téléphone,[date]) VALUES(@p1,@p2,@p3,@p4,@p5)", Conn)
Try
Save.Parameters.AddWithValue("@p1", TextBox1.Text)
Save.Parameters.AddWithValue("@p2", TextBox2.Text)
Save.Parameters.AddWithValue("@p3", TextBox3.Text)
Save.Parameters.AddWithValue("@p4", TextBox4.Text)
Save.Parameters.AddWithValue("@p5", DateTimePicker1.Text)
Conn.Open()
If (Save.ExecuteNonQuery()) Then
MsgBox("Ajout réussi ")
Else
MsgBox("Error iam here")
End If
Catch ex As Exception
Exit Sub
End Try
How can i correct this ?