Dec 072017
 
Clipper generic database add a record function with SOURCE!.
File ADDUDF.ZIP from The Programmer’s Corner in
Category Dbase Source Code
Clipper generic database add a record function with SOURCE!.
File Name File Size Zip Size Zip Type
MEMUDF.OBJ 2940 1578 deflated
MEMUDF.PRG 4748 1738 deflated
READ.ME 2290 1093 deflated

Download File ADDUDF.ZIP Here

Contents of the READ.ME file


Function: MEMVARADD
Author : Gary Blatt
Date : June 20, 1989

This function was written,as are most,out of a need I had at work. I needed
a simple method of adding(only) records to any database file without worrying
about setting up screen displays & memory variables. I did not need a fancy
data entry screen for this purpose. Thus was born MEMVARAD!. All you need to
pass to this function is the row to start the screen display on & the number
of fields to display on the screen at one time. The function will take care of
the rest. The source code has many comments to explain it, but in brief:

1. First, a check is done to make sure that the number of display fields
requested does not exceed the total number of fields in the database.
An error code of 1 is returned if this is true.

2. Next, a check is done to make sure that the starting row + the number of
display fields is not greater than 22. This leaves room at the bottom of
the screen for prompts. An error code of 2 is returned if this is true.

3. Next, the field info is read into several arrays. Another check is done
at this point for memo fields. Memo fields are not currently supported.
An error code of 3 is returned if this is true.

4. Next, the first screenfull of fields is displayed for entry. After entering
past the last field the user will be prompted to Continue to next screen,
Re-edit this screen, or Abort the whole add process.

5. The program then continues until all fields have been displayed. On the last
screen, if the user does not abort, the record is added to database and
a error code of 0 is returned. If at any screen prompt the user selects
Abort, the error code returned is 4.

This is by no means my most elegant work. However, IT WORKS! I would greatly
appreciate some feedback if you do use this routine. I am always open to
suggestion. By the way, I included the source, so feel free to with it what
you will. I would also like to recognize Richard Low for the Center routine
used in this function. If you have any questions,feedback,etc. I can reached
at Compuserve ID#73257,1737, The Programmers Corner(301-995-3744), Contech BBS
(301-340-2212) & probably several other BBS's.

Enjoy!



 December 7, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)