Oracle Objects for OLE
Release 8.1.7

Part Number A85257-01

Library

Product

Contents

Deleting Records

See Also
Quick Tour
Employee Form

Users can delete records by navigating to a particular record and clicking on the delete button. Our application prompts the user to verify the deletion, then deletes the record using DbDelete. The program then refreshes the screen with the next record or with the previous record if the user deleted the last record in the dynaset.

The delete click event procedure looks like:

Private Sub cmdDelete_Click()

'prompt user

Response = MsgBox("Do you really want to Delete?", vbYesNo + vbExclamation)

If Response = vbYes Then

EmpDynaset.Delete

'attempt to move to next record

EmpDynaset.MoveNext

If EmpDynaset.EOF Then 'If deleted last record

EmpDynaset.MovePrevious

End If

Call EmpRefresh

End If

End Sub


 
Oracle
Copyright copy; 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents