These Database Events fire when a view is created.
PROCEDURE DBC_BeforeCreateView( cViewName )
PROCEDURE DBC_AfterCreateView( cViewName, lRemote )|
Parameter |
Value |
Meaning |
|
cViewName |
Character |
The name of the view being created. |
|
lRemote |
.T. |
The view is a remote view. |
|
.F. |
The view is a local view. |
As with other before-and-after pairs of events, you can prevent a view from being created by returning .F. in the BeforeCreateView event. The AfterCreateView event simply receives notification that a view was created.
PROCEDURE DBC_BeforeCreateView(cViewName)
WAIT WINDOW PROGRAM() + CHR(13) + cViewName
* Ensure that view names follow the naming convention of using
* "LV_" as a prefix for local views and "RV_" for remote views.
PROCEDURE DBC_AfterCreateView(cViewName, lRemote)
IF (lRemote AND LEFT(cViewName, 3) <> "RV_") OR ;
(NOT lRemote AND LEFT(cViewName, 3) <> "LV_")
MESSAGEBOX(cViewName + " doesn't follow the corporate " + ;
"naming convention for views.")
ENDIF