Available

amalgame-mssql

MS SQL Server via ODBC / FreeTDS.

amc package add mssql GitHub ↗ ← Back to the ecosystem

Overview

Binding to MS SQL Server. Compatible with SQL Server 2017+ and Azure SQL. Dynamic-link to the official Microsoft ODBC driver (preferred for Always Encrypted and AAD auth) or FreeTDS (open-source, for minimal Linux deployments).

Features

  • Target: SQL Server 2017+ and Azure SQL Database
  • Microsoft ODBC driver (recommended) or FreeTDS
  • Prepared statements, transactions, MARS (multi-result-sets)
  • TLS via the ODBC chain (Always Encrypted compatible)
  • Dynamic-link pattern — no vendored fork

Example

Minimal usage example — copy-paste runnable after install.

amc package add mssql

let db = MsSql.Connect("Server=tcp:host,1433;Database=app;Uid=...;Pwd=...")
let rows = db.Query("SELECT id, total FROM orders WHERE customer_id = @p1", [42])
for row in rows {
    Console.WriteLine(row.GetInt("id"))
}

At a glance

Related packages