Gendbc.prg
Located in the Visual FoxPro Tools\Gendbc folder, this tool generates a program that can recreate a database. GenDBC.prg supports autoincrementing, collating sequences, and filtered primary keys. In Visual FoxPro 9.0, it also supports Blob, VarChar, and VarBinary type fields, and the AllowSimultaneousFetch, RuleExpression, and RuleText properties for views.
You can use this program to generate the following:
Code that you can analyze to learn how a database is created by using program code
Code that you can insert in your program code, eliminating the need to ship databases with your application
Code that you can insert in your program code to recreate the database if a customer's data is corrupt
DO GENDBC WITH filename
Parameters
filename
Specifies a character string containing the name of an output file. The filename can contain path information and a file extension. If no extension is supplied, the default extension, .prg, is used.Note
This program works only on the currently active database.
Example
The following example creates a program called MyData.prg, which contains code for recreating a database, MyDatabase. The program, Main.prg is created in the C:\VFP folder and contains code for recreating the database, Main.
OPEN DATABASE MyDatabase
DO gendbc WITH 'MyData.prg'
SET DATABASE TO Main
DO gendbc WITH 'c:\vfp\main'
See Also
Tasks
How to: Add a Label Definition Using Addlabel.app