Copyright 2004 by gINT Software. All rights reserved worldwide.
GR008.TXT
gINT Rules Code Samples - 008
Requires gINT version 6.1.016 or later.
NOTE: Code samples are provided free of charge and as-is. gINT Software makes no claim or warranty as to the accuracy of the samples. It is the responsibility of the user to ensure that the code performs as it should. Comments, suggestions, and error reports are appreciated.
Description
===========
1. Generates project statistics and stores them in a field in the PROJECT table. The statistics generated are:
Number of Points
Total depth of drilling/excavation
The number of Points of each type. The point type is taken as the characters left of the PointID.
The number of samples of each type. The sample type is taken from the "Type" field.
2. Updates a date/time field in the PROJECT table ("Last Modification") whenever a change is made to any data in any table in the database.
3. Updates a date/time field in the POINT table ("Last Modification") in the appropriate PointID record whenever a change is made to data in that record in the POINT table or in any child tables.
Revision History
================
05 January 2004:
Initial upload
*************************************************
INCLUDED FILES:
GR008.GLB:
gINT Rules code modules:
GR008 Main
Lithology
Point
Project
ProjectNotes
Sample
GR008 COMMON PROCEDURES AddBracketsFnS
InitFieldsFnB
IsChildTableFnB
LastModifications
ParseStringFnS
RecordsetClose
GR008.GPJ:
Sample project that makes use of the code modules.
*************************************************
INSTALLATION PROCEDURE:
Copy the files wherever you prefer. To see the gINT Rules code modules you must either merge the GLB into your library (Utilities:Lib Merge/Copy) or change to the included library (File:Change Library).
*************************************************
SPECIAL NOTES:
1. The project statistics are regenerated whenever the project record is saved. You can also force a regeneration by selecting the gINT Rules:Recalculate current table menu item while in the PROJECT table. The "Project Statistics" field is a memo. Double click in the field or press the F2 function key while on the field to see the full results. The date/time at the top of the results will be formatted to match your system settings whenever the statistics are regenerated.
2. For the "Last Modification" functionality to work properly you must have a gINT Rules Procedure on Save for all tables in the database with the call to the LastModifications procedure at the end of each of these procedures. The call must be after any other gINT Rules code is executed and must be skipped if an error was generated in the other code, that is, don't call LastModifications if the save was aborted.
*************************************************