Views:

Product: LABEL MATRIX

Version: All Versions

 

If you are attempting to create an ODBC connection to a .txt file, you may encounter issues with your data displaying properly depending on how the data is formatted. This article explains how to create an ODBC connection to .txt files in LABEL MATRIX, including comma-delimited and tab-delimited files.

The example below uses a tab-delimited file that will be imported into LABEL MATRIX as a database connection.

1: Verify the database directory.
Verify that the .txt file is stored in the default directory for LABEL MATRIX databases. To find this directory, navigate to Tools > Setup and select the Directories tab.

 

2: Open the ODBC Data Sources Administrator.
Open the ODBC Datasources (32-bit) Administrative Tool.
Note: This guide addresses the specific issue of attaching .txt files as databases within LABEL MATRIX using different delimiters. TEKLYNX provides support for TEKLYNX software but does not provide technical support for the Windows platform or its functions.

3: Create a System DSN.
Select the System DSN tab, then click Add.

We recommend creating a System DSN instead of a User DSN. A System DSN allows everyone on your network to access the ODBC connection through LABEL MATRIX.

4: Select the Microsoft Access Text Driver.
Select the Microsoft Access Text Driver from the list of Provider Drivers, then click Finish.

5: Configure the Data Source.
Name the Data Source. The data source name does not need to match the name of the file.
Clear Use Current Directory, then click Select Directory and navigate to the default directory used by LABEL MATRIX for database files. Click OK.

 

6: Configure the .txt file extension.
Click Options, select .txt from the Extensions List, and click Define Format.

7: Define the text file format and data types.
Select the .txt file from the Tables menu. If applicable, select Column Name Header.
Click Guess to query the file and display its columns. Select the appropriate format and data type from the drop-down menus. Click OK.

8: Close the ODBC Text Setup error message.
You may see an error message after configuring the text file. This appears to be a Windows issue and does not affect the file or its format.
Click OK to close the Error window. Click OK again to exit the ODBC Text Setup.

9: Verify the ODBC connection.
The newly created ODBC connection will appear in the ODBC Administrator window. Click OK.

10: Open LABEL MATRIX Label Properties.
The initial ODBC connection has now been created in Windows. To connect to it through LABEL MATRIX, navigate to File > Label Properties.

11: Add the database connection.
Select the Database tab, then click Add.

12: Select Advanced Setup.
Select Advanced Setup and click Next.

13: Select an OLE DB Provider Driver.
Select Select an OLE DB Provider Driver and click Next.

14: Select the Microsoft OLEDB Provider for ODBC Drivers.
Select Microsoft OLEDB Provider for ODBC Drivers and click Next.

15: Select the ODBC connection.
Select the desired ODBC connection from the list of previously created ODBC connections. Click Next.

16: Select the .txt file.
Select the .txt file from the default folder location used for LABEL MATRIX databases.

17: Open the text file.
Select the file and click Open. Click Next.

18: Review the analyzed records.
The Records Analyzed window queries the data using the OLEDB for ODBC Provider Driver and displays sample data from the file. Click Next.

19: Select the database access method.
Select the desired method of access and click Next.

20: Name the database connection.
Name the database connection. This is the name that will be displayed within LABEL MATRIX. Click Finish.

21: Verify the database connection in LABEL MATRIX.
The new connection will appear in the Database tab of the Label Properties window. Click OK.

22: Test the ODBC database connection.
To test the connection, select the DataGrid button within LABEL MATRIX.
The DataGrid displays a query of the data contained in the database.

Summary

After completing these s, the .txt file should be configured as an ODBC data source and connected to LABEL MATRIX as a database.

The process consists of two main stages:

  • Create and configure a 32-bit System DSN using the Microsoft Access Text Driver.
  • Connect the ODBC data source to LABEL MATRIX through File > Label Properties > Database > Add.

The connection can then be tested using the DataGrid button in LABEL MATRIX.

Important: This procedure is specifically for configuring .txt files as database connections in LABEL MATRIX using ODBC. The exact options displayed in the Windows ODBC tools may vary depending on the Windows environment and installed drivers.

If the ODBC connection is created successfully but the data does not display correctly in LABEL MATRIX, verify the following:

  • The .txt file is stored in the LABEL MATRIX default database directory.
  • The correct System DSN is selected.
  • The Microsoft Access Text Driver is configured for the correct file extension.
  • The correct delimiter, column headers, format, and data types are configured during Define Format.
  • The correct ODBC connection is selected when configuring the database connection in LABEL MATRIX.