PRO — $24.90/MO / 14-DAY PRO TRIAL ON SIGNUP

Print labels straight from Microsoft SQL Server

Connect the LabelInn Windows app to Microsoft SQL Server, write a read-only SELECT TOP query, and every result row becomes one label. The SQL Server driver is built in (no ODBC to install), and the connection can use a named instance such as SERVER\SQLEXPRESS.

PRO PLAN · 14-DAY TRIAL · WINDOWS DESKTOP APP
DATABASE QUERYROWS TO LABELS
Print labels straight from Microsoft SQL Server — LabelInn

Video / 1:27

Watch: Print labels from a database

1:27 walkthrough in the real app. Step-by-step page →

Video / 1:27LabelInn
Native printer languagesZPL, TSPL, TPCL, ESC/Label
No driver to installUSB, network or Bluetooth
Every platformWindows, macOS, Android, web
Free to startNo credit card, 14-day Pro trial

01

Who this is for

Manufacturing, warehouse and distribution teams running an ERP or WMS on SQL Server that produces label data no exporter covers.

02

Step by step

  1. Install the LabelInn Windows app on a PC that can reach the server. The database driver is built in; there is nothing else to install.
  2. Add the Microsoft SQL Server connection: host, port 1433, database and a database user that can read the tables you need.
  3. Write the Microsoft T-SQL query that returns exactly the rows you want to label, one row per label.
  4. Map each result column onto a label field — text, barcode, QR or RFID — then preview a few rows.
  5. Print the result set, or save the query so the next run is one click.
Choose the database type: LabelInn app screenshot
1Choose the database typeOracle, MySQL / MariaDB, PostgreSQL, Microsoft SQL Server and SAP HANA are supported.

Write ordinary T-SQL. Use SELECT TOP n while you are testing so a preview never pulls the whole table.

Try it with your own data — signing up starts a 14-day Pro trial, no credit card. After that database sources need Pro at $24.90/mo. Download now → | See pricing →

03

What you can do

  • Result columns bind to any label field, so barcode and QR content comes straight out of Microsoft SQL Server.
  • Re-run the saved query whenever you need the current rows — no export, no copy-paste, no stale file.
  • Mix database columns with static text, counters, dates and serial numbers on one label.
  • Printed rows are recorded in the print history, so a reprint or an audit can find the exact job later.
  • Queries can be parameterised, so an operator supplies a work order or batch number instead of editing SQL.

04

Technical details

ItemDetail
EngineMicrosoft SQL Server
Default port1433
Query languageMicrosoft T-SQL
DriverBuilt into the bridge: Microsoft.Data.SqlClient 5.2.1. No ODBC driver and nothing else to install.
PlatformWindows desktop app only. The connector is a Windows program that runs next to the app; on macOS and Linux use Excel or CSV.
CredentialsA connection created in the desktop app keeps its password in the PC's secure storage (Windows DPAPI); host, port, database and user name are saved with the connection. A connection created from the dashboard or the API stores the password encrypted (AES-256-GCM) in your company's cloud record and the PC fetches it when it runs a query.
AccessRead-only: only SELECT and WITH statements run. The connection test reports the server version and whether the account looks read-only.
DefaultsRow limit 1000 and timeout 30 seconds per saved query (both editable, timeout up to 300).
PlanPro ($24.90/month, $249/year). Without it you can still connect, run the query and see the first 10 rows; binding an element or printing the set needs Pro. The 14-day trial from sign-up includes it.

05

Requirements for a direct database connection

  • The LabelInn Windows desktop app, on a PC that can reach the database server. The connector does not run on macOS.
  • Nothing to install for the database driver: it is built in.
  • A database user with SELECT on the tables you label and nothing else. LabelInn never needs write access for printing.
  • A Pro plan or the 14-day trial to bind and print; connecting and previewing 10 rows is open to every plan.

CONNECTING

SQL Server specifics: instances, TLS and logins

LabelInn connection wizard, step 2: connection name, host, port, database and TLS selector for SQL Server
The Connection details step. Host, Port and Database are the three values everyone needs; the TLS selector is explained below.
LabelInn saved-query editor with the SQL box, detected parameters, row limit 1000, timeout 30 seconds and a result table
Saved query editor: "SELECT/WITH only. Use :name syntax for parameters", row limit and timeout, and Run sample. On SQL Server the query uses TOP, not LIMIT.
SettingWhat to enter
HostThe server name or IP. For a named instance write HOST\INSTANCE and set the port to 0: the host is passed to the driver as written.
Port1433 for a default instance.
DatabaseThe catalog the login connects to. Required for SQL Server.
TLS"Require" (the default) encrypts the connection and accepts a self-signed server certificate, which is how most on-premises servers are set up. "Prefer" and "Disable" are also offered. Certificate validation against your own CA is not exposed yet.
LoginA SQL login with SELECT on the tables. Windows (integrated) authentication is not offered in the form; the connection takes a user name and password.

THE QUERY

A label query in T-SQL

One row per label. Text conversions keep the numbers and dates exactly as you want them printed.

EXAMPLESQL
SELECT TOP 50
       sku, product,
       CONVERT(varchar(12), price) AS price,       -- 4.90 stays 4.90
       barcode, batch,
       CONVERT(char(10), expiry, 104) AS expiry    -- 31.03.2027
FROM dbo.labelinn_demo_products
WHERE batch = :batch
ORDER BY sku
  • TOP n goes right after SELECT (and after DISTINCT if you use it). There is no LIMIT. Keep a TOP while testing so a preview cannot return the whole table.
  • :batch is accepted: the bridge rewrites :name to the @name that SqlClient binds, so a query copied from Oracle or PostgreSQL keeps working.
  • Numbers and dates arrive as typed values. A decimal 4.90 reaches the label as 4.9 and a date as 2027-03-31T00:00:00, so convert to text in the query when the printed format matters (style 104 is dd.mm.yyyy).
  • Use NVARCHAR columns and N'...' literals for accented text.
What was verified

The query was syntax-checked as T-SQL with node-sql-parser. It was not run against a live SQL Server: none was available. The :name to @name rewrite and the error mapping below come from MssqlProvider.cs.

WHEN IT FAILS

SQL Server error numbers LabelInn recognises

SQL Server errorLabelInn reportsUsual cause
18456, 4060, 40615auth_failedWrong password, login disabled, or the login cannot open that database (4060) or Azure firewall (40615).
208table_not_foundInvalid object name: missing schema prefix (dbo.) or wrong database.
207column_not_foundInvalid column name, often a typo or a column from a different table.
(blocked before sending)sql_blockedThe statement is not a plain SELECT/WITH: EXEC of a stored procedure, INSERT, several statements joined by ;, or a text literal containing a blocked word such as DELETE.

A stored procedure cannot be the label query because EXEC is blocked; wrap the logic in a view and select from it.

ANY PRINTER

Design it, bind your data, print on the printer you already own.

Zebra, TSC, Toshiba, Epson and more — over USB, network or Bluetooth, with no driver to install.

LabelInn on a laptop with a thermal printer and the printed label

QUESTIONS / FAQ

Frequently asked questions

Which Microsoft T-SQL do I write?

Ordinary Microsoft T-SQL. LabelInn does not rewrite your SQL; it runs the statement you saved and maps the result columns onto label fields. Use `SELECT TOP n …` while testing.

Can I print to a Zebra or TSC printer from Microsoft SQL Server without a driver?

For models LabelInn drives natively over ZPL, TSPL or TPCL, yes — the command stream is generated and sent directly. That is independent of the database driver, which is only used to read your rows.

Does label data leave my network when I print from Microsoft SQL Server?

The query runs on the PC where LabelInn is installed, against your own Microsoft SQL Server server, and the rows fill the label there. What is stored in the cloud is the label design and the print record, plus the connection's host, port, database and user name. The password depends on how the connection was made: A connection created in the desktop app keeps its password in the PC's secure storage (Windows DPAPI); host, port, database and user name are saved with the connection. A connection created from the dashboard or the API stores the password encrypted (AES-256-GCM) in your company's cloud record and the PC fetches it when it runs a query.

Does LabelInn need an ODBC driver for SQL Server?

No. The connector program carries the Microsoft SQL Server client (Microsoft.Data.SqlClient) inside it, so there is no ODBC driver, bitness or DSN to set up.

Can I connect to a SQL Server named instance?

Yes: enter HOST\INSTANCE as the host and 0 as the port. The host string is handed to the driver unchanged. This path comes from the code and was not run against a live server.

Which T-SQL can the label query use?

Any read-only SELECT or WITH statement. TOP n limits rows, :name parameters are rewritten to @name, and stored procedures, INSERT/UPDATE/DELETE and multi-statement batches are refused.

NEXT STEP / LABELINN

Print your Microsoft SQL Server data on the printer you already own

Database sources run on Pro — $24.90/mo, or $249/year (pay for 10 months, use 12). Signing up starts a 14-day Pro trial, so you can bind your own Microsoft SQL Server data and print a real label before you pay anything. · 14-day Pro trial on signup · No credit card required · Database connections run on the Windows desktop app

Start free →