Logo

Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.

MODIFY PROCEDURE

This command opens the program editor for the stored procedures of the current database. It’s the same editor you get with MODIFY COMMAND and MODIFY FILE.

Usage

<a name=Usage>MODIFY PROCEDURE [ NOWAIT ]</a>

NOWAIT indicates that execution should continue once the editing window is displayed, rather than waiting for the user to close it.

In VFP 7, if the database has Database Events turned on, the BeforeModifyProc and AfterModifyProc events fire.

Be careful when editing stored procedures. The RI Builder stores its results at the end of your hand-coded stored procedures, and you need to take care to make your changes/additions without disturbing the RI Builder-generated procedures at the end. You’ll know when you’ve reached the beginning of the code generated by the RI Builder by the scary warning comment line.

Although we don’t use these features every day, we’re a little disappointed we didn’t get clauses similar to the MODIFY COMMAND command—NOEDIT, NOMENU, WINDOW, etc.—or some variation of the METHOD keyword introduced in VFP 5 for forms and classes. (The METHOD keyword is less important in VFP 7 with the addition of the Document View, which makes it easy to find specific routines.) Being stuck with the FoxPro editor is bad enough, but this leaves us with little opportunity to expand on it.

Example

<a name=Example>OPEN DATA TasTrade</a>
MODIFY PROCEDURE

See Also

AfterModifyProc, BeforeModifyProc, Create Trigger, Display Procedures, Modify Command, Modify Database, Modify File, Open Database