本文介绍了如何编码删除按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Friends!!





i想要编写一个删除按钮,删除数据库中的记录,数据库名称是profileTBL,请帮帮我...



i尝试了这段代码,但似乎有错误...



我尝试了什么:





i want to program a delete button that will delete records in a database , the database name is profileTBL , help me please...

i tried this code but it seems that there is an error...

What I have tried:

Private Sub dltbtn_Click(sender As Object, e As EventArgs) Handles dltbtn.Click
       confirm = MsgBox("do you want to delete the student profile", vbYesNo + vbCritical, "deletion confimation")
       If confirm = vbYes Then
           rs.Delete(ADODB.AffectEnum.adAffectCurrent)
           MsgBox("Record has been deleted successfully!!!", vbInformation, "message")
           rs.Update()
           Refresh()
       Else
           MsgBox("Profile not deleted", vbInformation, "message")
       End If
   End Sub

推荐答案


这篇关于如何编码删除按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 14:54