|
|
|
|
How to data binding ADO.NET DataSet Access or SQL Server DB to print barcode labels with Zebra ZPL-EPL printers and VB.NET or C# by using ThermalLabel SDK for .NET
Prerequisites
- Neodynamic ThermalLabel SDK 2.0 for .NET
- Microsoft .NET Framework 2.0 (or greater)
- Microsoft Visual Studio 2005 / 2008
- Microsoft Visual Studio 2005 / 2008 Express Editions (VB, C#, J#, and C++)
- Any Zebra Thermal Printer supporting ZPL (Zebra Programming Language) or EPL (Eltron Programming Language)
ThermalLabel SDK supports .NET Data Binding scenarios allowing you to print thermal labels bound to a data source such as custom .NET objects, XML files, Databases, ADO.NET, etc.
In this guide you will learn how to perform data binding with databases like MS Access or SQL Server to print barcode labels with Zebra ZPL or EPL printers by using ThermalLabel SDK for .NET
The following sample features an MS Access Database file ( C:\Temp\DatabaseSample.mdb) containing an Employees table. An ADO.NET DataTable as well as a ThermalLabel objects will be used for data binding scenario printing a set of thermal labels for each employee as shown in the following figure.
 NOTE The following output is from a ZPL printer. Other printers based on different programming languages like EPL will produce different outputs.
IMPORTANT: To test the sample code you must have installed a Zebra ZPL-based or EPL-based thermal printer.
Follow these steps:
-
Download and install latest version of
Neodynamic ThermalLabel SDK for .NET
- Open Visual Studio 2005 / 2008 and create a Windows Forms application.
- Add a reference to Neodynamic.SDK.ThermalLabel.dll assembly.
- Download the DatabaseSample.mdb database file and copy it to C:\temp\ folder. The structure of the Employees table in DatabaseSample.mdb file is as follows:
- Add a button control onto the form and paste the following code in the click event handler of the button:
IMPORTANT NOTICE
Although ThermalLabel SDK supports both ZPL and EPL printers, a label design you write using .NET code like C# or VB.NET will not produce the same output printing under ZPL and EPL printers. If you need to support both printer languages in your project then you will have to design two different labels targeting each printer language separately.
- Run the sample Windows Forms application and test it.
If you need more information or assistance, please contact our
.
|
|
|
|