Share via


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. 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

Addlabel.app | Code Analyzer | Genhtml.prg | Hexedit.app | Cpzero.prg | Utility Programs