Author Topic: SQLite Database Example  (Read 4120 times)

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
SQLite Database Example
« on: January 26, 2020, 05:35:58 PM »
This is just an example that shows one possible way of using SQLite (purely for learning purposes).

The solution is in the attached SQLite.7z file but you will need to get SQLite.Interop.dll files and add them to the x64 and x86 folders.
You could find these dll files still available in the solution provided here:

   https://www.advancedhmi.com/forum/index.php?topic=1813.msg17141#msg17141


The attached pictures show what it looks like.
It has 2 tables, one for current customers and the other for archived customers.
Id is unique for any customer and will be archived as such.
The 1st picture shows all customers just before 3 of them were archived.

All that this solution will allow you to do is:
- Add a new customer
- Edit current customer's record
- Archive current customer
- Search for a customer within either current or archived customers
- Export either data table to a .csv file

Columns can be added or removed and the whole solution could be converted maybe for parts database or something else.

Any data in the attached pictures is made up and the solution might have bugs.

You can find another example of using SQLite in the "Application Showcase" category, posted by Phrog30, for alarming & history.

« Last Edit: December 06, 2023, 12:42:34 PM by Godra »