Search by Tags

How to use SQLite in C

 
Article updated at 28 Oct 2017
Compare with Revision



SQLite is a relational database management system contained in a small (350 KB) C programming library. SQLite is a popular choice as embedded database for local/client storage in application software such as web browsers. It is arguably the most widely deployed database engine, as it is used today by several widespread browsers, operating systems, and embedded systems, among others.

Use Cases

  • Inventory manager.
  • Billing station.
  • Automated Parking System.
  • Attendance system.
  • and many more..

Download

  • Download the sqlite_demo source code from here.

Steps to run SQLite Demo

  • Setup WinCE development environment using this link
  • Build sqlite_demo.sln in Visual Studio 2008 and then deploy on Colibri device.
  • Navigate to Program Files on Colibri device, project folder and run sqlite_demo.exe.

Following window will open showing different choice for sqlite_demo


Enter 2 to insert into database, Enter ID and then module type


After insert press 1 to display whole DemoTable.


Similarly

  • To delete enter 3 & then ID to be deleted.
  • To modify enter 4 & then ID to be modified and then new ID and MODULE.
  • To Search enter 5 & then ID to be searched.
  • To sort enter 6 it will get sorted according to ID.