System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Supported Platforms 

System.Data.SQLite is the original SQLite database engine and a complete ADO.NET 2.0 provider all rolled into a single mixed mode assembly.  It is a complete drop-in replacement for the original sqlite3.dll (you can even rename it to sqlite3.dll).  Unlike normal mixed assemblies, it has no linker dependency on the .NET runtime so it can be distributed independently of .NET.

Compact Framework Users:  1.0.59.0 introduces a breaking change to the CF binary.  I've been forced to split it into two DLL's -- the managed wrapper and the native ARM binary.  This is a breaking change from previous versions.  See this post for more details.

Here is a brief overview of its features:

Complete ADO.NET 2.0 Implementation
The provider was written from scratch on VS2005/2008 specifically for ADO.NET 2.0, using all the most recent changes to the ADO.NET framework.  That includes full DbProviderFactory support, automatic distributed transaction enlistment, connection pooling, extensive schema support, Entity Framework support and more.

Supports the Full and Compact .NET Framework as well as native C/C++
Whether you're programming in .NET or straight C/C++ on the desktop or a mobile device, we've got a build for you.

Mono support
A managed-only version of the provider is also available that works on Mono against the official SQLite library from http://www.sqlite.org/.  Requires 3.6.1 or higher.

Support for the ADO.NET 3.5 Entity Framework
Supports nearly all the entity framework functionality that Sql Server supports, and passes 99% of the tests in MS's EFQuerySamples demo application.

Completely portable database files
Unencrypted SQLite databases can be freely shared across all platforms and CPU types, including non-Windows platforms. Encrypted databases can be shared across all Windows platforms and processors.

Incredibly fast, faster than most every other embedded database, including Sql Server Mobile
SQLite's installed size is a fraction of Sql Mobile's. It uses less memory at runtime, and generates smaller databases as well.

Encryption Support
The entire database file can be encrypted.  Binary and cleartext passwords are supported.

Visual Studio 2005/2008 Design-Time Support
You can add a SQLite connection to the Server Explorer, create queries with the query designer, drag-and-drop tables onto a Typed DataSet and more! SQLite's designer works on full editions of Visual Studio 2005/2008, including VS2005 Express Editions.
* NEW You can create/edit views, tables, indexes, foreign keys, constraints and triggers interactively within the Visual Studio Server Explorer!

Single file redistributable under 600kb
The desktop native SQLite library and the ADO.NET wrapper are combined into a single mixed assembly.  Precompiled binaries are available for x86, IA64 and x64.  The Compact Framework has two files -- a native ARM-compiled library and the managed wrapper.

Extensive SQL support
SQLite implements most of the SQL92 standard (see below).  Supports named and unnamed parameters along with full UTF-8 and UTF-16 support each with optimized pipelines into the SQLite core.

User-Defined Functions & Collating Sequences
Full support for user-defined functions and collating sequences means that in many cases if SQLite doesn't have a feature, you can write it yourself in your favorite .NET language.  Writing UDF's and collating sequences has never been easier.

Full Source Included.  100% Free.
The full source to the wrapper and SQLite engine is in the public domain.  There are zero licensing restrictions for private or commercial use.

SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. Features include:

  • Transactions are atomic, consistent, isolated, and durable (ACID) even after system crashes and power failures.
  • Zero-configuration - no setup or administration needed.
  • Implements most of SQL92. (Features not supported)
  • A complete database is stored in a single disk file.
  • Database files can be freely shared between machines with different byte orders.
  • Supports databases up to 2 terabytes (241 bytes) in size.
  • Sizes of strings and BLOBs limited only by available memory.
  • Small code footprint: less than 30K lines of C code, less than 250KB code space (gcc on i486)
  • Faster than popular client/server database engines for most common operations.
  • Simple, easy to use API.
  • TCL bindings included. Bindings for many other languages available separately.
  • Well-commented source code with over 95% test coverage.
  • Self-contained: no external dependencies.
  • Sources are in the public domain. Use for any purpose.

What's New

  • Re: 1.0.60 Not Returning The Correct Data

    I alos get wrong results. I tried to isolate it. We have two tables (Tag and TagAssignment) which are joined by a join table (Tag_To_TagAssignment). Correct results (showing the data in the database) : SELECT DBID FROM TagAssignment ---------- 1 2 ---------- SELECT DBID FROM Tag ---------- 1 2 ---------- SELECT TagAssignment_FK, Tag_FK FROM Tag_To_TagAssignment...
    Posted to Bugs (Forum) by ssteinegger on 11-20-2008
  • Re: VB.net Visual Basic (Get Values From DB)

    Hello, I have worked with SQLite without issues on the iPhone, but am new to using it under Windows. I have Visual Studio 8.0 Professional Edition and have downloaded as per your instructions in the kirupa.com article about SQLite and VB net. I can see that the installation worked since my VB project now has SQLite elements in the toolbox. I then copy...
    Posted to How To (Forum) by leom on 11-19-2008
  • Re: CompactFramework testce.exe fails

    I'm pretty fresh on CF so please yell at me if I'm doing something stupid. I was running testce.exe directly in XP which (I see now from your answer) was never going to work. I have now run it from a WM5 device, WM5 emulator and PocketPC emulator and all gave the error File or assembly name 'System.DataSQLite, Version=1.0.58.0, Culture=neutral...
    Posted to Bugs (Forum) by s01ipsist on 11-19-2008
  • Re: CompactFramework testce.exe fails

    So just to be clear ... you deployed testce.exe, the CF version of System.Data.SQLite.DLL, and SQLite.Interop.060.DLL to a Windows CE device (or emulator) and it fails to run?
    Posted to Bugs (Forum) by Robert Simpson on 11-19-2008
  • CompactFramework testce.exe fails

    I've installed 1.0.60 on a clean XP system just to be sure. The test.exe program in the main directory runs fine and succeeds all the tests. Running testce.exe gives a very generic error "cetest has encountered a problem and needs to close. We are sorry for the inconvenience."
    Posted to Bugs (Forum) by s01ipsist on 11-19-2008

Who Is Online

Powered by Community Server (Commercial Edition), by Telligent Systems