Adding a Database

Adding a Database

To add a new database, click the New icon from the menu bar or select File | New. A dialog box will appear, click Save as Type and choose Database Files (*.dbf). Enter a filename for the database and click Add.

Up to 7 index files per database may be specified. This allows for much faster access to the data when printing formats. When you are asked for a search field name, when defining a database field in a format, it should be one of your indexed fields.

When using a database search key, an index file will be created based on your chosen search key, thus making the search time faster. Once the index file is created, it will be saved as part of your database structure.

The structure of the internal database is the same as that used by the program dBASEIII+. This makes it possible to use many of the powerful features of dBASE on your database or to access a database created by dBASEIII+.

You may use databases created under dBASE III, III+, IV or an ASCII database directly, without having to convert them first to ASCII1 text files. Your dBASE files may be copied into this software’s subdirectory if desired. However, this is not necessary because any file may be accessed simply by specifying the path. The available database files will be displayed in alphabetical order for the default directory or subdirectory.

Since the software’s database structure is compatible with dBASE III, III+ and IV file structure, databases can handle up to 128 fields per record, over 4000 bytes per record and more than 1 million records per file.

NOTE: When fields are displayed on the screen for purposes of editing or viewing, only those fields that will fit in one window will be shown. Having a print out of the structure of your dBASE fields will serve as a reminder of those fields not seen.

The data from these databases can be included in formats designed with the software. A format field can be specified so that it contains the value from a particular database field in a specified database. For each database that will be used in this way, a particular field must be specified as the search field. When the field’s data is to be retrieved, the database is searched to find a record that matches the desired value entered by the operator. A database record can also be designed to contain a serial number value. The purpose of this, for example, is to allow part number specific serial numbers, rather than format specific serial numbers. To declare a field to be a serial number, you can design the structure to have a numeric field with the desired length.

For retrieving a record in the quickest possible time, an internal database should be used. This is an internally indexed file that allows for rapid search.

Also included under the database functions are the functions associated with Serial Files. These files hold the data for a given format field that require unique values for each format printed.

You will be asked to enter a new database name. An alphabetical listing of current database files will also be displayed. Afterwards, you will be presented with the Database Structure Creation screen. From here you need to define the structure of the database.

The following options will allow you to define new fields for the database:

  • Add a New Field Sequentially

    Will add the new fields in sequential order.

  • Insert a New Field

    Will allow you to insert a new field in any order you wish.

For the above options, the database field definition screen will be presented.

Field Name

The name of the field may be up to 10 characters long. The name must begin with a letter but may also contain numbers and the underscore character. Embedded blanks are not permitted.  The field name can also be a Reserved Word

Data Type

Valid field types are as follows:

Field Length

This is the maximum number of characters or digits that are to be contained in the field. Date, logical and memo fields are fixed length fields.

Decimal Places

The number of decimal positions in a numeric field. The value entered here should be 2 less than the field length of the numeric field value.

Example: A numeric field length of 5 may have decimal places defined as 3, 2, 1 or 0.

Field Position

The position to insert the field within the structure. This appears after you have defined at least one field for the database.

Editing the Database Structure

In order to edit the database, you must first choose the option Create the New Database. After creating a new database, the Database Records Management screen will be presented.

Reserved Words

There are four (4) reserved words that can be used for database field names: FMTCOUNT, BARSUPP, LBLCOUNT and FMTNAME.

FMTCOUNT allows you to control the number of labels printed for each individual record when using the $all function.  When FMTCOUNT is used as a field name, the record is printed as many times as the number stored in this field. FMTCOUNT is useful when different records in the database require a different number of labels.  For example, when multiple locations are used to shelve an item.

BARSUPP allows you to suppress the printing of all bar codes on a particular label when using the $all function. This would be used to prevent attempted reordering of a discontinued item or attempted ordering of a vendor replenished item. When BARSUPP is used as a field name the absence of a character means print the code. The presence of any character means suppress the code.

LBLCOUNT allows you to change the default batch size for individual database records.  When LBLCOUNT is used as a field name, the value stored in this field becomes the default batch size when printing single database records.  LBLCOUNT will not work with the $all function, use FMTCOUNT if you are using $all.

FMTNAME is the fourth reserved word.   FMTNAME prevents you from printing an incorrect format with a database record. Formats used with FMTNAME should have the same field names on each of the formats and contain only ONE database connection.  Connecting to more that one database when using FMTNAME will cause unexpected results. To make use of FMTNAME, follow these steps:

1) Follow the instructions, above, to add a database and to add new fields.

2) Make the FMTNAME field as a new field:

The Field Name is FMTNAME.

The Data Type is Character.

Enter the field length.

Once all new fields are added, click on Create the New Database.

3) Follow the instructions in Editing a Database, to add records to a database.  The fields in the database record MUST be populated.

Enter the data for each field in the database. The data for the FMTNAME field is the name of the format in which this database record will be used. For example, if the database contains information about parts, and the format name is PARTLBL, then the data for the FMTNAME field should be PARTLBL.

If the FMTNAME field is left blank for any record, then that particular record can be printed on any format that makes use of the database.

BACK to TOP


1

ASCII: The character set and code described in American National Standard Code for Information Interchange. Each ASCII character is encoded with seven bits and consists of both control and printing characters.