Views:

Product: LABELVIEW, CODESOFT
Version: All Versions

Overview

Object Linking and Embedding (OLE) allows files created in other applications to be included in label designs. LABELVIEW and CODESOFT include an OLEDB Administrator that lets you create connections between your label and external databases or spreadsheet files, such as Microsoft Access and Microsoft Excel. Once the connection is established, database fields can be used to populate objects on your label.

Create an OLEDB Database Connection

1. Open the Query Definition dialog box using one of the following methods:
  • Select Data Source > Database > Create/Edit Query.
  • If the Data Source window is open, right-click Database and select Create/Edit Query.

 

2. Click New, then select OLEDB from the drop-down list to open the OLEDB Administration window.

3. Click New to open the Data Link Properties dialog box.

NOTE: The Data Link Properties dialog box and the remaining dialogs in this procedure are Microsoft Data Link components and are supported through Microsoft's documentation.

4. Select the appropriate Provider for your database or data source, then click Next.

Choose the provider that matches your data source. For example:

  • If your data is stored in Microsoft SQL Server, select the appropriate SQL Server provider.
  • If your data is stored in Microsoft Access (.mdb), select the Microsoft Jet OLE DB Provider.
  • If your data is stored in Microsoft Access (.accdb), select the Microsoft Access Database Engine provider.
  • If your data source is not listed (for example, .dbf files), install the required OLE DB provider or driver before continuing.

5. Enter the connection information required for the selected provider, then click OK.

NOTE: The options displayed on the Connection tab vary depending on the selected provider. In most cases, you must provide:

  • The name of the database or data source.
  • The location of the database or file.
  • Any required username or password needed to access the data.

 

6. In the Connection field, enter a name for the new database connection, then click OK.

7. Verify that the new connection appears in the Administrator OLE DB Connections list, then click OK to return to the Query Definition dialog box.

8. Confirm that the new connection is now available in the Select a data source drop-down list within the Query Definition dialog box.

9. Select the appropriate table from the Select a table drop-down list. The fields contained in the selected table will appear in the Select fields pane.

NOTE: If you will be working with multiple database tables, enable the Include name of tables option to display the table name alongside each field. This can make it easier to distinguish fields that have the same name in different tables.

10. Select the fields you want to include on your label, then click OK.

The selected database fields will be available for use in your label design.

11. When prompted, choose whether to save the query by selecting Yes or No.

NOTE: Saving the query is optional. Choosing No does not affect the database connection that you created. The connection remains available for use even if the query is not saved.

12. Add the database field to your label using one of the following methods:
  • Navigate to Data Source > Your Connection > Your Field, then select Place.
  • In the Data Sources window, right-click the desired field and select Place.

The selected database field is placed onto your label and is ready to be formatted or used for printing.