Saturday, November 8, 2014

SQLite The free and powerful database for small usage with vb.net

Sqlite The free and powerful database for small usage


Are you looking  for free database that you can use in your application ?

I would like to suggest your "SQLite" (download link) , after you install you will have this file "System.Data.SQLite.DLL" , this is all you need.

let's start.

1) you create normal window application., you will come to this screen look on your right.
how_to_sqlite_1









2) click on "show all files" icon
how_to_sqlite_show_all_files

3) right click at "References" , then select "add reference.."
how_to_sqlite_add_reference









4) select "Browse" tab then select your file "System.Data.SQLite.DLL"
how_to_sqlite_choose


















5) you will have reference appear., now your project is ready to use.
how_to_sqlite_list_reference
















6) first , we need to create database. This is function to do.
how_to_sqlite_create_database










7) after you run this function, you will have new file create (with zero byte because you have nothing yet)
how_to_sqlite_create_database_result



8) second, we will have to create database structure with tables.

  1. we create connection (this function will be used for every time you want to connect to database)
    how_to_sqlite_create_database_connection
  2. now we are ready., so let's create table (see more detail about field type here)


  3. next we insert some data






  4. now we have data ready in table,

          for more information about syntax of SQLite Query you can look at here.