COPY PROCEDURES Command

Example   See Also

Copies stored procedures in the current database to a text file.

Syntax

COPY PROCEDURES TO FileName
  [AS nCodePage] [ADDITIVE]

Arguments

FileName

Specifies the name of a text file to which the stored procedures are copied. If the file doesn't exist, Visual FoxPro automatically creates it.

AS nCodePage

Specifies the code page for the text file to which the stored procedures are copied. Visual FoxPro copies the stored procedures, and, as it does so, automatically converts the stored procedures to the code page you specify.

If you specify a value for nCodePage that is not supported, Visual FoxPro generates an error message. You can use GETCP( ) for nCodePage to display the Code Page dialog box, allowing you to specify a code page for the text file to which the stored procedures are copied.

If you omit AS nCodePage or if AS nCodePage is 0, no code page conversion occurs.

ADDITIVE

Appends the stored procedures to the end of the specified text file. If you omit ADDITIVE, the stored procedures replace the contents of the text file.

Remarks

Use COPY PROCEDURES with APPEND PROCEDURES to programmatically modify stored procedures in a database. A database must be open and current when COPY PROCEDURES is issued; otherwise Visual FoxPro generates an error message.