Oracle Objects for OLE
Release 9.2

Part Number A95895-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

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 © 1994, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback