This sample source code below will display you how to generate barcodes from database with barcode sdk in C#. ByteScout Premium Suite: the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can generate barcodes from database with barcode sdk in C#.
Want to save time? You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Premium Suite for generate barcodes from database with barcode sdk below and use it in your application. Just copy and paste the code into your C# application’s code and follow the instructions. Use of ByteScout Premium Suite in C# is also described in the documentation included along with the product.
ByteScout Premium Suite free trial version is available on our website. C# and other programming languages are supported.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
using System.Data.OleDb; using Bytescout.BarCode; namespace GenerateFromDatabase { class Program { static void Main(string[] args) { // Create Barcode generator instance using (Barcode barcode = new Barcode()) { // Set barcode type to QR Code barcode.Symbology = SymbologyType.QRCode; // Create database connection using (OleDbConnection connection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=demodb.mdb;User Id=admin;Password=;")) { connection.Open(); // Create SQL query using (OleDbCommand command = connection.CreateCommand()) { command.CommandText = "SELECT title FROM Books"; OleDbDataReader dataReader = command.ExecuteReader(); // Iterate values and generate barcode images int i = 0; while (dataReader.Read()) { barcode.Value = dataReader.GetString(0); barcode.SaveImage(i + ".png"); i++; } } } } } } }
60 Day Free Trial or Visit ByteScout Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: