Hackers Guide to Visual FoxPro 7.0
BeforeDropView, AfterDropView
These database events fire when a view is removed from a database, whether programmatically using the DELETE VIEW or DROP VIEW commands, or visually using the Database Designer.| Usage | PROCEDURE DBC_BeforeDropView( cViewName ) PROCEDURE DBC_AfterDropView( cViewName ) |
| Parameter | Value | Meaning |
| cViewName | Character | The name of the view. |
As with other before-and-after pairs of events, you can prevent a view from being removed by returning .F. in the BeforeDropView event, while the AfterDropView event is simply notified that a view was removed.
| Example | * This goes in the stored procedures for a database. PROCEDURE DBC_BeforeDropView(cViewName) WAIT WINDOW PROGRAM() + CHR(13) + ; 'cViewName: ' + cViewName PROCEDURE DBC_AfterDropView(cViewName) WAIT WINDOW PROGRAM() + CHR(13) + ; 'cViewName: ' + cViewName * End of stored procedures. * Create a view, and then remove it. CREATE SQL VIEW TestView AS SELECT * FROM CUSTOMER DROP VIEW TestView |
| See Also | BeforeCreateView, Create SQL View, Database Events, Delete View, Drop View |
View Updates
Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.
Категории