|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
i want to delete the selected record, here is my coding, but it consist of errors. Below are my coding, what is the problem there?
response = MsgBox("You are about to delete 1 record." & vbCrLf & "If you click YES, you won't be able to undo this delete operation." & vbCrLf & "Are you sure you want to delete these record?", vbCritical + vbYesNo, "Confirm Delete") If response = vbYes Then Set rst = New adodb.Recordset rst.Open "Student", db, adOpenDynamic, adLockOptimistic rst("ID") = txtLecID.Text rst("Name") = txtLecName.Text rst("Address") = txtLecAdd.Text rst("CIty") = txtCity.Text rst("PostCode") = txtPCode.Text rst("State") = cboState.Text rst("Tel") = txtLecTel.Text rst.Delete end if Pls advise... thanks |
|
#2
|
|||
|
|||
|
I always use execute:
response = MsgBox("You are about to delete 1 record." & vbCrLf & "If you click YES, you won't be able to undo this delete operation." & vbCrLf & "Are you sure you want to delete these record?", vbCritical + vbYesNo, "Confirm Delete") If response = vbYes Then Db.execute "Delete Student where ID='" & txtLecID.text & "'" ![]() |
|
#3
|
|||
|
|||
|
thanks ya... it is work! :>
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Delete problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|