I'm following all the instructions that I can see in the web, including MSDN:https://msdn.microsoft.com/en-us/library/ms233819.aspx
Unfortunatelly, no matters how much I change the code, it always return to me an error: "A first chance exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll", and the update is not done. This is my code:
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim connect3 As New OleDbConnection("Provider=Microsoft.ACE.OleDb.12.0;" & "Data Source =C:\Users\Fernando\Documents\Visual Studio 2012\Projects\Agenda_DP\Agenda_DP\AgendaDP.accdb")
connect3.Open()
Dim cmd3 As OleDbCommand = connect3.CreateCommand()
cmd3.CommandText = "UPDATE Temas SET [Numero] = @p1, [Tema] = @p2, [Observacoes] = @p3 WHERE [Numero] = @1"
cmd3.Parameters.AddWithValue("@p1", Me.ComboBox1.Text)
cmd3.Parameters.AddWithValue("@p2", Me.ComboBox2.Text)
cmd3.Parameters.AddWithValue("@p3", Me.TextBox3.Text)
cmd3.ExecuteNonQuery()
connect3.Close()
End Sub
I don't understand why this is happening.
Has this ever happened to anyone? How did you solved it? Can anyone help me with this issue?