Metode Penghapusan ADO


Referensi Objek Recordset Lengkap

Metode Hapus digunakan untuk menghapus catatan saat ini atau sekelompok catatan. Setelah menghapus rekaman, rekaman yang dihapus tetap terkini hingga Anda pindah ke rekaman lain.

Catatan: Jika Anda berada dalam mode pembaruan batch, penghapusan terjadi saat Anda memanggil metode UpdateBatch.

Catatan: Untuk menggunakan metode ini, pastikan bahwa objek Recordset memungkinkan penghapusan record.

Catatan: Jika metode ini gagal, penyedia tidak akan menghentikan eksekusi, tetapi akan mengirimkan peringatan ke Koleksi Kesalahan. 

Sintaksis

objRecordset.Delete affectrecords

Parameter Description
affectrecords An AffectEnum value that specifies which records this method will delete. Default is adAffectCurrent

Nilai AffectEnum

Constant Value Description
adAffectCurrent 1 Deletes only the current record
adAffectGroup 2 Deletes only records that satisfy the Filter setting (Filter must be set to a FilterGroupEnum value or an array of Bookmarks)

Referensi Objek Recordset Lengkap