I have this code working on VB.NET 2008 but not working in VB.NET 2010 and show no error code. When I use the query analyzer the query work good, but when I try on my code nothing happen. I can do SELECT code and that ok, it’s just the update my problem. Please is somebody can help me?
`Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Try
Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\DB_MAINT_TRDWND.mdb"
Dim dbConnection As System.Data.IDbConnection = New System.Data.OleDb.OleDbConnection(connectionString)
Dim myUpdateQuery As String = "Update Navire_Clients set equipage = 'Skipper' where Num = 10"
Dim myConnection As New OleDb.OleDbConnection(connectionString)
Dim myCommand As New OleDb.OleDbCommand(myUpdateQuery)
myCommand.Connection = myConnection
myConnection.Open()
myCommand.ExecuteNonQuery()
myConnection.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub`