sql = "Delete from Fault where TechID='" & TechIDM & "'"
Using connection As New OdbcConnection(constring)
Dim commandDelete As New OdbcCommand(sql, connection)
connection.Open()
'Messagebox to give secure check to user about deleting data
If MsgBox("Are you sure you wish to proceed?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
commandDelete.ExecuteNonQuery()
connection.Close()
End If
End Using
connection.Close()
I would do better but try it please
Don't judge me, just Upgrade me. Thanks!