BUILDER DATABASE FUNCTIONS The Builder Database functions are a flexible and easy to use set of Clipper UDFs designed to add/change/delete database records. One of the features that make them so easy to use is the ability to add or change databases one record at a time. This is an advance over the normal xBase style of one field at a time database I/O. The way this is achieved is to create a STATIC array of field values for every database in your application. A corresponding manifest constant entry is made in a Header (.ch) file for every database field in your application. The manifest constant is created by prefixing the field name with an alphabetic character. For example, the database field CITY might become the manifest constant 'ACITY'. 'ACITY' would then get translated by the Clipper preprocessor to an array element, like 'aCity[1]'. Therefore the aCity file wide STATIC array is equal to one record in the Cities database. This method of using manifest constants instead of the array syntax provides both readable source code and efficient access to database data. The Builder Save_It() function requires four parameters in order to Add/Change/Delete/ or Recall a database record. When adding a record you can (optionally) use the deleted records of your database as "Add Space" when using the Save_It() function. That way recycling your deleted records instead of APPENDing BLANK to add a record. Using this feature requires that SET DELETED ON is active (Builder default) and that each database to use this feature has an open index created like: INDEX ON IF(DELE(),"*"," ") TO ... This uses one valuable file handle per database; but the ease of maintaining data integrity, NEVER-EVER having to PACK these databases, and maintaining top performance makes this an excellent solution for network database systems. Note that using Save_It() to delete a database record will delete in a cascade fashion all child related records also. Cascade deleting will only occur if the database has active RELATIONs set. All Builder File Mainteneance and TBrowses that allow record deletions call Save_It() and will, therefore, have cascading deletes. Other Builder database functions do your file maintenance chores for you, including maintaining related databases. Move field data to memory with DbStor(), Browse databases with Plist(). Use Fld_Repl() instead of REPLACE when only a few fields need to be updated. Fld_Repl() locks and unlocks records when used on a network. Also see the following functions in the Builder library documentation: DbStor() - Store database fields to an array. Fil_Lock() - Lock an entire database. The following functions are in the Builder library, but are used internally only and should not be required in any other way. DbRepl() - Write a database record from an array. Add_Rec() - Append a Database Record, Network Aware Net_Use() - Called by Open_Fil() after error testing. Opens a database, used in Summer '87 only. Rec_Lock() - Lock a database record. ** End of File ***