Using SQLite in .NET
7 July 2007 in Programming
SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. My favorite features are definitely his lightweight (less than 250KiB fully configured), speed and cross-platform. Can be used for both web and desktop applications.
There isn’t builtin support for SQLite in .NET, but there are some tools you can find online that ease the task.
Richard Heyes maintains a simple SQLite .NET wrapper. The wrapper does not follow the ADO.NET style of data access, instead uses a simpler method based on a client class, and a result set class. This method is sometimes better because doesn’t add the ADO.NET weight to you application (saves some memory and resources), thus more similar to the objective of using SQLite.
For full support, there is a complete enhanced version of SQLite (complete drop-in replacement for the original sqlite3.dll) with the same features of the original SQLite plus complete ADO.NET 2.0 provider for full managed development. The wrapper and engine is also open-source. This project is definitely the most powerful, bringing ADO.NET 2.0 support and Visual Studio 2005 Design-time support.
Also, you can also find a SQLite ODBC Driver. Although is very slow, it provides a simpler way to edit and design the database.
This tools should provide you with a good start.
Search
Pages
Top Posts
- 15 Visual Studio .NET Add-Ins you won't live without
- Using SQLite in .NET
- How to get started with Silverlight Streaming
- Avoid chaos, don't let bugs take your project away
- Best-Ever Ad from Microsoft
Categories
- All
- Random tidbits
- Links
- Windows
- Fun
- Portuguese
- WebDev
- Programming
- Blogging
- Personal Experience
- Microsoft
- Tech
- OS
- Linux
- Security
- TV
- Software
- Databases
- Hardware
- WPF
5 comments. Add your own comment.
Filipe says 7 July 2007 @ 15:38
Just a sidenote, for the ones that use Mono, there’s also a Mono.Data.SqlLite namespace.
fabiopedrosa says 7 July 2007 @ 19:19
Yes. That’s true.
I completly forgot Mono… Something I don’t normally do
John-Daniel Trask says 10 July 2007 @ 22:29
You could take this a step further an abstract away SQLite using something like LightSpeed, a domain modeling framework which supports SQLite out of the box.
You can check it out at eap.mindscape.co.nz if you’re interested in learning more about LightSpeed.
I’ve also written a few prototypes leveraging SQLite and can only say it has been fantastic. The features for size is great and I can’t endorse it enough if you need a small SQL database.
- JD
Philippe Leybaert says 11 July 2007 @ 14:43
CoolStorage.NET, a .NET 2.0 ORM library recently added support for SQLite 3
http://www.codeplex.com/coolstorage
Fatal says 14 July 2007 @ 00:49
The NHibernate ORM also has full support for SQLite.
Leave a Comment