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.

DISPLAY PROCEDURES, LIST PROCEDURES

These two commands tell you about stored procedures in a database.

Usage

DISPLAY | LIST PROCEDURES
         [ TO PRINT [ PROMPT ]
          | TO [ FILE ] cFileName [ ADDITIVE ] ]
         [ NOCONSOLE ]

The names of the procedures are listed in the order in which they’re stored in the database. Note that this is not the same order you see in the Project Manager. The PM lists stored procedures alphabetically.

This listing includes those procedures added automatically by the Referential Integrity Builder. Note that DISPLAY/LIST PROCEDURES show you only the names of the procedures, not their contents.

A database has to be open and set as current before you issue these commands.

When you DISPLAY or LIST PROCEDURES to a file, the indentation of the procedure names is strange. We can't see any rhyme or reason to it. Even stranger, the listing that appears in the file and the one you see on the screen if you don't include NOCONSOLE have different indentation. Bizarre. If you're planning to parse this file, make sure to use LTRIM() on the results so the indentation doesn't matter.

Example

OPEN DATABASE TasTrade
LIST PROCEDURES TO FILE TTProcs.TXT

See Also

Copy Procedures, Display and List, Display Database