ByteScout Barcode Suite - C# - Generate barcodes from database with barcode sdk - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Barcode Suite – C# – Generate barcodes from database with barcode sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – C# – Generate barcodes from database with barcode sdk

How to generate barcodes from database with barcode sdk in C# using ByteScout Barcode Suite

How to write a robust code in C# to generate barcodes from database with barcode sdk with this step-by-step tutorial

ByteScout simple and easy to understand tutorials are planned to describe the code for both C# beginners and advanced programmers. What is ByteScout Barcode Suite? It is the bundle that privides 3 SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK). It can help you to generate barcodes from database with barcode sdk in your C# application.

These C# code samples for C# guide developers to speed up coding of the application when using ByteScout Barcode Suite. Simply copy and paste in your C# project or application you and then run your app! This basic programming language sample code for C# will do the whole work for you to generate barcodes from database with barcode sdk.

You can download free trial version of ByteScout Barcode Suite from our website with this and other source code samples for C#.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
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++; } } } } } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next