Setting up SQLite

Setting up SQLite turned out to be a lot easier than I thought, though I first went through a lot of false starts. I downloaded Microsoft’s System.Data.SQLite, but I couldn’t create DataSets in Designer. I installed and uninstalled a lot of things, but finally, it seemed the only thing I needed was a driver, just like with Access!

The only free version I found is published by a company called DevArt. They have a ton of database drivers and developer tools. Best of all, they offer a free version of their SQLite driver. It’s called dotConnect for SQLite Standard.
It’s possible that you can installed DevArt’s dotConnect from within Visual Studio, but I downloaded it directly and installed it. You’ll have to create an account at DevArt to download the driver, but hey, free software!

Once you’ve installed DevArt’s dotConnect, you will be able to access SQLite databases, but you won’t be able to alter their structure (I suppose you could, through code, but that would be painful). For this, you need a database administration GUI. If you’re familiar with MySQL and PHP, you have probably used PHP-Admin. We need something like that, but for SQLite.

An excellent open-source GUI for SQLite is SQLite Studio. It will let you create databases, edit their structure, and even enter data. Download it, install it, and we’re cooking with gas!

To recap, you just need to do two things to start working with SQLite in Visual Studio.
1.- Download and install DevArt’s dotConnect for SQLite Standard (free)
2.- Download and install SQLiteStudio, the open-source application.
You can then use SQLiteStudio to create your database, and Visual Studio to create DataSets from it via DevArt’s dotConnect for SQLite.

Over to the right, you can see what SQLiteStudio’s interface looks like. You can create databases, add tables, connect to existing databases, alter table structures. It has an SQL query editor and a table to show query results. You can do all the CRUD stuff (Create, Update, Delete). Consider it your database administrator.

Leave a Reply

Your email address will not be published. Required fields are marked *