At the bottom of the "Database Field Names" section of the above dialog is a display of the remaining space left in the record. Database types limit the overall record length to different values and this number indicates how much space is left for use with fields. You will not be allowed to assign fields which make up a record longer than the maximum amount.
The database field names are added and deleted using the Add a Field and Delete a Field buttons. For a step by step description of how to add database fields please refer to the Guided Tour chapter. When the Add a Field button is pressed, a dialog appears for defining the field characteristics. The dialog includes radio buttons for selecting the type of data (alphanumeric, numeric or counter), the name of the field, the format of alphanumeric fields and special characteristics for the numeric and counter fields. It looks like this:

Alphanumeric Fields
Alphanumeric fields can be displayed in one of several different formats. These are:
· General, in which any textual information can be displayed
· Date, in which only date information can be entered
· Time, in which time only can be entered
· Timestamp, in which a date/time combination is all that can be entered
· Logical, in which a "T" is placed in the database field for TRUE, and nothing for FALSE. Displayed text can be specified for each state.
In the case of the last Date, Time and Timestamp categories, the times and dates are displayed according to the settings in the Windows™ Control Panel. This is further augmented by a setting in the Configuration, Date/Time Set Up menu selection, where the display of seconds in time areas can be suppressed. The Windows™ Control Panel can be used to set up the way dates are displayed, including the order of digits, leading zero display and century display. Similarly, it can also determine how time is displayed, adjusting such things as leading zero display, 12 hour or 24 hour clock format, and the separator character.
When this field type is selected there is an entry field for setting the field length. When the field format is General the field will suggest a length of 40 characters. You can change this to any value between 1 and the maximum allowed by the database type. This is usually 255 and will never be more than this even if the database type would otherwise allow it. When deciding on a field length choose the smallest value which will allow the longest likely string of characters to be entered.
Date, Time, Timestamp and Logical fields display their field length but you cannot change the value. The number displayed will vary with database type and is typically 10, 8, 19 and 1respectively.
When Logical is selected, 2 additional fields become available to define the text to be displayed for the True and False states. It is not required to enter anything in these fields, although in practice at least one is usually filled in, depending upon the meaning of the field. For example, if the field is Authorized, you might want to enter Yes and No in these fields. If the field is EKG Qualified, then the True text might be EKG and the False left blank. Then multiple such fields could be strung together in one rectangle of the badge to display a list of the individual's qualifications.
Numeric Fields
When selecting numeric type fields you have the option of specifying the maximum number of decimal places. The entry field labeled Field Length in the dialog above changes to Decimal Places. Set this value to zero if you want integers only. It is also possible to specify that the field length shall be fixed and which character to use to fill the field out to this length. If the “Fixed Length” is set to 0 or 1, the field length will be variable based upon the size of the number and the fill character will not be used.
If a number greater than 1 is used, the numbers with more digits than this cannot be entered. Numbers with less than this number of digits are padded on the left with the character supplied in the “Fill Character” entry field. It is not necessary for the fill character to be numeric. If a badge record already exists with a number containing more digits than the number entered in the “Fixed Length” entry box, it will not be modified, nor will any warnings be issued.
If a fixed length number greater than 1 is entered, a fill character must be entered. Clicking the OK button will not work until the fill character is supplied.
Numeric fields occupy 15 slots in the database record and this number can be used to determine if sufficient room in the record is available.
Counter Fields
A counter field is always an integer so the “Decimal Places” field is preset to zero. The fields labeled “Starting Value” and “Increment” are now available. The entry field labeled Field Length in the dialog above changes to Decimal Places and the value is set to zero. Each time a new badge is created, the current starting value is used and then the starting value has the increment value added to it ready for the next badge. The current starting value is remembered, even between separate uses of the program.
The “Fixed Length” and “Fill Character” fields are also available so all the comments in the Numeric Fields section above also apply here. If fixed length is selected and a counter tries to create a number which would result in more digits than the fixed field will allow, the user is warned with a dialog allowing him to ignore the warning, increase the fixed field length by one, or reset the counter value to 1.
Like numeric fields, counter fields also occupy 15 slots in the database record and this number can be used to determine if sufficient room in the record is available.
Field Names
The underlying syntax of ODBC (SQL) uses a number of reserved words which cannot be used as field names. These include such words as "LIKE", "INTEGER" and "DOUBLE". If you attempt to use a reserved word the program will alert you and require you to enter a different name. In general, use names which mean something specific to your database like "FirstName" or "PhoneNo" and no conflict will occur.
Field Name Lengths
Field name lengths vary depending upon the type of database. FoxPro and dBase only allow 10 characters, whereas MS Access allows 64. You will not be allowed to enter more than the selected database type will allow.
Field Names Aliases
To deal with the limitations for Field Names, the entry can have an optional alias name entered. The alias can be up to 30 characters long and has no restrictions on its content (other than that the first character cannot be a space). It must also be unique. The alias name will be shown throughout the program when the field name would normally appear. If no alias is entered, the real field name will be displayed.
Field Name Display
The fields are displayed in the field list followed by abbreviated information about their properties. This information is enclosed in either single or double echelon symbols. If there is a field alias name, the alias will be displayed in single echelon characters. The parameters for the field are shown in double echelons. An ‘A’ indicates the field is alphanumeric in general format (‘D’ if in date format, ‘T’ if in time format, or ‘S’ if in timestamp format), ‘N’ if numeric and ‘C’ if a counter. The last two are also followed by digits separated by a slash. The numeric field shows the decimal place, the fixed field length and the fill character. The counter field shows the starting value, increment, fixed field length and the fill character. In both cases, if the fixed field length is a zero, the field is floating length and no fill character is displayed.
For example:
Name«A40» is an alphanumeric field in general format with a field length of 40 characters
DOB«D» an alphanumeric field in date format
EmpNum ‹Employee No› «N0/6/0» is a numeric field with an alias of "Employee No", zero decimal places, a fixed length of 6 and a ‘0’ as the fill character
BadgeNum«C100/1/0» is a counter field starting at 100, incrementing by 1 and floating length