How to use Sqlite Databases with ADO.Net

Step1: Download binary file “Sqlite3.dll” from http://www.sqlite.org/download.html
Step2: Download file “System.Data.Sqlite”- SQLite-1.0.60.0-managedonly-binaries from http://sourceforge.net/project/showfiles.php?group_id=132486&package_id=145568&release_id=630679
Step3: Add reference to System.Data.Sqlite
Step4: Copy sqlite3.dll into your application build/startup folder
Step5: Write the following connection string
// To create new sqlite database
ConnectionString = “Data Source =” + this._DbName +”; Version = 3; New = true;”
// for existing sqlite database
ConnectionString = “Data Source =” + this._DbName +”; Version = 3; New = false;”
Step6: Import System.Data.Sqlite namespace
Step7: Create instance of DbProviderFactory using
System.Data.SQLite.SQLiteFactory.Instance;
Helpful links
http://www.sqlite.org/about.html
http://sourceforge.net/project/showfiles.php?group_id=132486&package_id=145568&release_id=630679
http://www.osenxpsuite.net/?xp=3 (Sqlite 2008  EnterpriseManager)
Continue ReadingHow to use Sqlite Databases with ADO.Net