Database-Key

Note: The Loftware Label Manager subsystem uses ODBC (Open Database Connectivity) to access external databases.  See Appendix A for information on how to connect to your database using ODBC.

When you wish to retrieve information from a database, Loftware Label Manager requires a “key” connection.  This connection is a “look-up” command that instructs Loftware Label Manager to locate the appropriate record for the required data.

In Loftware Label Manager, you identify your data key by selecting the Database-Key option from the Data Source dialog box.  To better understand Database-Key and its look-up function, think of the data in a telephone directory.

In a telephone directory, “Name” is the “key connection.”  That is, people always locate a telephone number by “looking up” the name first.  An individual’s name provides the key to other pieces of data, such as a street address and telephone number.

Loftware Label Manager’s ODBC works the same way.  When you identify the look-up key (e.g., Part Number”), you are providing the user with the key that allows Loftware Label Manager to retrieve critical data for your labels.  The Database-Key is unique because even though the data source is Database, it also requires keyboard input from the user.  It is both a keyboard entry field and the look up key for the database.

Every label that is attached to a database must have one field that is designated as the Database-Key.  Note again, that the Database-Key field is a dual-purpose field:

·      It accepts keyboard input from the user or LPS pass file.

·      It retrieves data from a database like a Database-Data field.

Note: A Database-Key may not be linked to a Unicode field in a database.

The top part of the Database-Key setup dialog defines the connection to the database.  Database-Key / Data Source fields have the following options:

Key: Data Source Name - Select the name of the database to which you want to connect.  Note that this is the data source name (DSN) you assigned to the database in the ODBC Control Panel.  For some ODBC drivers, this name is the name of a single database.  For other ODBC drivers, such as the .DBF driver, this name is the name of a group of databases.

Key: Table Name - Select the name of the specific table in the database to which you want to connect.  For relational databases, like Microsoft Access, this is the name of a table in the selected database.  For “flat file” databases, like .DBF files, this is the name of the specific database.  For Microsoft Excel workbooks, this field contains the name of the specific worksheet in the workbook.

Key: Field Name - Select the name of the field in the database that you want to associate with this field on the label.

The bottom part of the Database-Key setup dialog defines how this field is set up on the On-Demand Print Form.  The options are:

Get Value From - The Get Value From field defines from where the key field entry comes.  For simple database connections, this is always Keyboard (the default).  

Entry is Optional - Check this option if you wish to allow the user to bypass the look-up function and omit database data from selected labels.

Key: Help Text - The Help Text field allows you to enter a custom prompt that is displayed in the Status Bar (at the bottom of an On-Demand Print Form) to assist the user in data entry.