Jackcess.Net 2.0.0

dotnet add package Jackcess.Net --version 2.0.0
                    
NuGet\Install-Package Jackcess.Net -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Jackcess.Net" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jackcess.Net" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Jackcess.Net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Jackcess.Net --version 2.0.0
                    
#r "nuget: Jackcess.Net, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Jackcess.Net@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Jackcess.Net&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Jackcess.Net&version=2.0.0
                    
Install as a Cake Tool

Jackcess.Net

NuGet License

Pure managed library for reading and writing Microsoft Access (.mdb / .accdb) files. No ODBC, no ACE drivers, no native dependencies. It builds for .NET 10, .NET 11, .NET Framework 4.8 and .NET Standard 2.0. It is a C# port of the spannm/jackcess Java project, and the files it writes are checked against Access's own engine (ACE), not only read back by the library that wrote them.

This project started from release 1.2.2 of mehran-ghanizadeh/jackcess-dotnet and is now maintained on its own, with its own package, Jackcess.Net. It is not a release of the Jackcess project, and neither the Jackcess authors nor Mehran Ghanizadeh maintain or endorse it. How it differs from both: Differences from Java Jackcess and from upstream.

Installing

dotnet add package Jackcess.Net

The package ID is not the assembly name: the assembly and the namespace are JackcessDotNet (using JackcessDotNet;), and dotnet add package JackcessDotNet installs another port's package, not this one. It has assemblies for .NET 10 and later (net10.0, net11.0) and .NET Framework 4.8 and 4.8.1 (net48), and a netstandard2.0 one for .NET 8 and 9, .NET Framework 4.6.2 to 4.7.2 and anything else on .NET Standard 2.0: Getting started has which assembly each gets, where each is tested, and what a distributed build must carry.

Quick start

using JackcessDotNet;

// Open an existing .mdb / .accdb (auto-detects version)
using var db = Database.Open("Northwind.mdb");

foreach (var name in db.GetTableNames())
    Console.WriteLine(name);

var customers = db.GetTable("Customers");
foreach (var row in customers.Rows)             // read as they are enumerated
    Console.WriteLine($"{row["CustomerID"]}  {row["CompanyName"]}");

Row? alfki = customers.FindRowByPrimaryKey("ALFKI");

// A cursor moves both ways.
var cursor = customers.CreateCursor();
while (cursor.MoveNext())
    Console.WriteLine(cursor.Current!["CompanyName"]);

// Create a new database, define a schema, insert rows. With no format it is an Access 2000-2003 .mdb;
// FileFormat.Access2007, Access2010, Access2016 and Access2019 are .accdb.
using var fresh = Database.Create("MyData.mdb");
using var accdb = Database.Create("MyData.accdb", FileFormat.Access2010);
var people = fresh.CreateTable("People", new[]
{
    new ColumnDefinition("Id",   DataType.Int32) { IsAutoNumber = true },
    new ColumnDefinition("Name", DataType.Text)  { MaxLength = 50 },
    new ColumnDefinition("Born", DataType.DateTime),
}, "Id");
var alice = new Row { ["Name"] = "Alice" };
people.Insert(alice);                           // alice["Id"] is now 1

// A row that is read has every column, null for one with no value.
Row read = people.FindRowByPrimaryKey(1)!;
string? name   = read.GetValue<string>("Name");
DateTime? born = read.GetValue<DateTime?>("Born");   // null

// A row that is read is updated or deleted by where it was read, whatever key its table has.
read["Born"] = new DateTime(1990, 4, 1);
people.Update(read);

What it does

  • Files. Access 97 to Access 2019 files are read; .mdb (Access 2000-2003) and .accdb (Access 2007, 2010, 2016 and 2019) files are created and written. An Access 97 file is only read.
  • Rows. Inserted, updated in their place and deleted, through a table or a cursor; a batch goes in whole or not at all. Cursors go both ways, and index cursors through an index's rows, between two entries or all.
  • Indexes. Every index is kept on every write, unique indexes are enforced, and text keys are the ones Access writes.
  • Relationships. Foreign keys are enforced, with cascades, unless turned off; relationships are created and dropped.
  • Schema changes. A table with rows is given columns, indexes and a primary key; columns, indexes, tables and relationships are dropped, and columns, indexes and tables renamed.
  • Properties. A table's, a column's and the database's are read and written; Required and Allow Zero Length are held to.
  • Protected files. An .mdb with a database password or encoded by Access, and an .accdb encrypted with a password.
  • Sharing. A file open to be written keeps Access and other writers out; one opened ReadOnly opens beside Access.
  • Import and export. DataTable, DataSet and IEnumerable<T>.
  • Not yet. Saved queries are not read, and a few things are refused rather than written as Access would not write them: the list is in What is and is not supported.

Documentation

The documentation has a page for each topic:

Building

The .NET 11 SDK builds every target: dotnet build JackcessDotNet.slnx builds them, and dotnet test JackcessDotNet.slnx runs the tests on .NET 10, .NET 11 and .NET Framework 4.8. Building and testing has how the netstandard2.0 assembly is tested, and the rest. Problems are reported in this repository's issues.

Version history

CHANGELOG.md. Up to 1.2.2 it is the history of the port this started from; what has changed since is in What this fork changes and in this repository's pull requests.

Credits

This project would not exist without the years of reverse-engineering work done by James Ahlborn (original Jackcess) and Markus Spann (maintained fork at spannm/jackcess). The Jet binary format is documented effectively only through their Java source. The C# port this repository started from is Mehran Ghanizadeh's mehran-ghanizadeh/jackcess-dotnet.

License

Apache License 2.0 — same as the upstream Jackcess project. NOTICE records the works this is derived from.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 308 11/24/2026
2.0.0-preview.7 64 11/22/2026
2.0.0-preview.6 68 11/22/2026
2.0.0-preview.5 67 11/21/2026
2.0.0-preview.4 76 11/21/2026
2.0.0-preview.3 70 11/20/2026
2.0.0-preview.2 63 11/20/2026
2.0.0-preview.1 62 11/20/2026