About SQLite.NET
This class library is an ADO.NET wrapper around the popular (and free!) SQLite database engine. For information on SQL syntax, features of SQLite and a good understanding of how it works and what it does, I highly recommend heading over to sqlite.org and reading the documentation there.
The C# provider, the very minor C code modifications to SQLite, documentation and etc were written by Robert Simpson, and the SourceForge project page can be found here.
The System.Data.SQLite project is currently maintained by the SQLite Development Team and the latest source code and project information can be found here.
What's New?
Click here to see the version history of this SQLite.NET provider
Using this library
The following are links to information on various aspects of the library and how to use it in your application(s)
How to install Visual Studio Design-Time Support
How to configure and enumerate SQLite.NET through the DbProviderFactories object
Getting the best performance out of SQLite
SQLite.NET Provider Features
This SQLite provider implements every feature of the underlying SQLite database engine without omission. Here's a brief summary:
- Written from scratch on Visual Studio 2008 specifically for ADO.NET, implenting all the base classes and features recently introduced in the framework, including automatic transaction enlistment.
- Supports the Full and Compact .NET Framework, as well as native C/C++ development. 100% binary compatible with the original sqlite3.dll.
- Full support for Mono via a "managed only" provider that runs against the official SQLite 3.6.1 or higher library.
- Full Entity Framework support (ADO.NET 3.5 SP1)
- On the Compact Framework, it is faster than Sql Server Mobile. SQLite's installed size is a fraction of Sql Mobile's. It uses less memory at runtime, runs queries faster, and has a smaller database file size as well.
- Encrypted database support. Encrypted databases are fully encrypted and support both binary and cleartext password types.
- Visual Studio 2005/2008/2010/2012/2013/2015 Design-Time Support. You can add a SQLite database to the Servers list, design queries with the Query Designer, drag-and-drop tables onto a Typed DataSet, etc.
- Full SQLite schema editing inside Visual Studio. You can create/edit tables, views, triggers, indexes, check constraints and foreign keys.
- Available as a single file redistributable (except Compact Framework). The core sqlite3 codebase and the ADO.NET wrapper are combined into one multi-module assembly.
- Also available as separate native and managed assemblies and optionally with the Visual C++ Runtime statically linked.
-
Binaries included for Itanium, x64, x86 and ARM processors.
Itanium processor support not currently included. - DbProviderFactory support.
- Full support for ATTACH'ed databases. Exposed as Catalogs in the schema. When cloning a connection, all attached databases are automatically re-attached to the new connection.
- DbConnection.GetSchema(...) support includes the MetaDataCollections, DataSourceInformation, Columns, Tables, Views, ViewColumns, Catalogs, Indexes, IndexColumns, ForeignKeys and Triggers.
- Enhanced DbDataReader.GetSchemaTable() functionality returns catalog, namespace and detailed schema information even for complex queries.
- Named and unnamed parameters.
- Full UTF-8 and UTF-16 support, each with optimized pipelines into the native database core.
- Multiple simultaneous DataReaders (one DataReader per Command however).
- Full support for user-defined scalar and aggregate functions, encapsulated into an easy-to-use base class in which only a couple of overrides are necessary to implement new SQL functions.
- Full support for user-defined collating sequences, every bit as simple to implement as user-defined functions and uses the same base class.
- Full source for the entire engine and wrapper. No copyrights. Public Domain. 100% free for commercial and non-commercial use.
Distributing the Binaries (Desktop)
When using the mixed-mode assembly, the System.Data.SQLite.DLL file
includes all the native and managed code. In that case, this is the only
DLL required to be redistributed with your SQLite.NET application(s).
When using separate native and managed assemblies, the
System.Data.SQLite.DLL file contains all the managed code and the
SQLite.Interop.DLL file contains all the native code.
The native code comes in 3 flavors: Win32, Itanium and x64 (AMD64).
Itanium processor support not currently included.
Distributing the Binaries (Compact Framework)
Both the System.Data.SQLite.DLL and SQLite.Interop.XXX.DLL files must be deployed on the Compact Framework. The XXX is the build number of the System.Data.SQLite library (e.g. "113"). The SQLite.Interop.XXX.DLL file is a fully native assembly compiled for the ARM processor, and System.Data.SQLite is the fully-managed Compact Framework assembly.