hallo,
why doesn't this function? Only when I select the datarow, push the delete
button of the keyboard and then the btnrubriekweg button.
why not immediately from the rubriekweg button only?
a thankful Hyphessobrycon, the new fish in the vbOcean
Private Sub btnrubriekweg_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnrubriekweg.Click
Dim cn As New OleDb.OleDbConnection(constr)
Dim dc As New OleDb.OleDbCommand
dc.Connection = cn
Try
dc.CommandText = ("delete soort=?, kosten=?, datum=? from tblVast where
soortid = ?")
Catch ex As Exception
MsgBox(ex.Message)
End Try
dc.Parameters.Add("@soort", OleDb.OleDbType.VarChar, 50, "Soort") ' "Soort")
dc.Parameters.Add("@kosten", OleDb.OleDbType.Single, 16, "Kosten")
dc.Parameters.Add("@datum", OleDb.OleDbType.Date, 12, "Datum")
dc.Parameters.Add("@soortid", OleDb.OleDbType.BigInt, 64, "Soortid")
daVastBewerkenJ.DeleteCommand = dc
Try
daVastBewerkenJ.Update(dsVastBewerkenJ, "tblVast")
Catch ex As Exception
MsgBox(ex.Message)
End Try
refreshen_vast()
End Sub
End Class