Progress
Programming
Handbook


Building a Schema Cache File

To build a schema cache file, you use the SAVE CACHE statement together with a connected database. You must first decide whether you need the entire schema cache or only the schema cache for selected tables of a database. If your application accesses all the tables in the database, you need the complete cache. Otherwise, you can build a schema cache file for only the tables that are accessed by your application.

In general, you build a schema cache file off-line, after making a schema change in the database. You can do this in the Procedure Editor directly, or you can write a small maintenance procedure to generate the file.

This is the syntax of the SAVE CACHE statement:

SYNTAX
SAVE CACHE { CURRENT | COMPLETE } 
  database-name TO pathname 

The databasename can be the literal logical name of any Progress database or the VALUE(expression) option, where expression is a character expression that evaluates to the database name.

NOTE: For a DataServer, Progress saves the schema cache for the entire schema holder database. You cannot save the schema cache for a non-Progress database separately. For more information on schema cache files for DataServers, see your Progress DataServer guide.

The pathname can be the literal pathname of an operating system file or the VALUE(expression) option, where expression is a character expression that evaluates to the pathname.

Saving the Entire Schema Cache

To save the entire schema cache.

  1. Connect to the database.
  2. Execute the SAVE CACHE statement using the COMPLETE option.

For an example procedure that saves the entire schema cache for one or more databases, see the SAVE CACHE Statement reference entry in the Progress Language Reference .

Saving a Partial Schema Cache for Selected Tables

To save a partial schema cache for selected tables of a database.

  1. Connect to the database.
  2. Read each table you want to include in the schema cache with a FIND statement.
  3. Execute the SAVE CACHE statement using the CURRENT option.
  4. If you want to save a different partial schema cache for the same database, disconnect the database and repeat Steps 1 through 3.

Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095