SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.
This is a LOCAL database.
When am I supposed to use this?
SQLite is great if you want to save a lot of data locally. Let's say you have 10 listboxes for different settings each with about 50 entrys. Now you sure don't want to have 10 textfiles containing that data. Furthermore, SQLite allows you to instantly sort the entrys on retreiving using SQL commands(ORDER BY).
Simply add the System.Data.SQLite library as reference to your project.
I'm not going to explain you how to add a reference to your project, you should know this by now.
Now simply import System.Data.SQLite as namespace and you are done.
In order to make your project work on other computers, you will have to include the SQLite library within the same folder
or embedd the library into your executeable. You can just do the following:
Project -> References
Set the library's CopyLocal property to True.
On the next debugging, the library will be put in the same directory the program is debugged in.
Usage - Creating/Inserting/Retreiving
To help you understand SQLite I'm going to show you a sample project. The project handles the following:
A user can submit notes and retreive them.
This will not be advanced at all, it should just give you a brief overlook.
To handle the notes, let's first declare a structure.
[highlight="VB.Net"]Public Structure Note
Dim Title As String
Dim Note As String
End Structure[/highlight]
Besides, we need to declare a connection and import System.Data.SQLite and System.IO.