Command Cancellazione




‘ Create a delete command that filters records by their Au_ID field only.
Dim cmdDelete As New OleDbCommand(“DELETE FROM Authors WHERE Au_ID = ?", cn)
‘ Create a parameter, and set its properties.
With cmdDelete.Parameters.Add(“@p1", OleDbType.Integer)
’ This is the name of the column in the DataTable.
.SourceColumn = “Au_ID"
’ We want to use the original value in each DataRow.
.SourceVersion = DataRowVersion.Original
End With
‘ Assign command to the DeleteCommand property of the DataAdapter.
da.DeleteCommand = cmdDelete











( commandcancellazione.html )- by Paolo Puglisi - Modifica del 17/12/2023