home *** CD-ROM | disk | FTP | other *** search
- DISPSTRU.COM v1.1
-
- Author: Dale Thorpe
- CIS ID: 76520,1400
-
- Date last update: 05/21/93
- Syntax:
- DISPSTRU <Database Name>
- DISPSTRU <Database Name>, [<pause after screen full>]
- DISPSTRU <Database Name>, [<write code to file>]
-
- This utility will display a database structure from the DOS prompt.
- I have seen several utilities that do this before, but they usually
- didn't do exactly what I wanted. So as an excercise with C, I wrote
- this program to do what I needed it to do. I hope it can be of use to
- other people during their development cycle also. It's free, Public
- Domain.
-
- Options:
-
- 1. Appending a " p" after the database name will cause the program to
- pause after each screenfull of data is displayed. You don't have
- to depend on MORE being available.
-
- 2. Appending a " v" after the database name will cause the program to
- create a file named VARIABLE.TXT that contains the necessary code to
- store the database fields to variables and to transfer the variable
- information back to the database and to display and edit the fields.
- If the VARIABLE.TXT file exists, an error will be displayed and no
- processing will occur.
-
- Example:
- // PROCESSING VARIABLES FOR: Tasks
- // Store database information to variables
- mprojnumb := Tasks->projnumb
- mprojkey := Tasks->projkey
- mtasknumb := Tasks->tasknumb
-
- // Store variable information to database
- Tasks->projnumb := mprojnumb
- Tasks->projkey := mprojkey
- Tasks->tasknumb := mtasknumb
-
- // Display fields in database
- @ 0,1 SAY Tasks->projnumb
- @ 1,1 SAY Tasks->projkey
- @ 2,1 SAY Tasks->tasknumb
-
- // Get fields in database
- @ 0,1 GET Tasks->projnumb
- @ 1,1 GET Tasks->projkey
- @ 2,1 GET Tasks->tasknumb
-
- The variables, fields and ":=" are lined up in their own columns for
- readability purposes. The program will not calculate the width of the
- longest field, instead it allows for maximum length fields.
-
- 3. Only one option is allowed. if options are mixed, all options are then
- ignored. The database structure will be displayed without pausing and
- the file for variable processing will not be created.
-
- This utility program was written in Borland Turbo C++ 3.0
-
- This program is provided AS IS without any warranty, expressed or implied,
- including but not limited to fitness for a particular purpose.
-