0

I want to bind my DataGridView WinForms control to a sqlite db so that my UI updates when the database updates. Using the designer is currently broken in VS2017 and higher according to How to bind a DataGridView to a SQLite Database? which I can easily reproduce myself. Note that I'm using the latest System.Data.Sqlite nuget.

How can I do this programmatically instead?

markf78
  • 597
  • 2
  • 7
  • 25
  • 1
    `UI updates when the database updates` Doesn't work that way. – LarsTech Jan 20 '20 at 15:37
  • 1
    When working with ADO.NET, as long as the data provider you are using supports ADO.NET objects, it doesn't care which data provider you are using, the code style is the same. Take a look at [this post for example](https://stackoverflow.com/a/38427392/3110834) or [this one](https://stackoverflow.com/a/36274706/3110834) and use `SQLiteDataAdapter`. – Reza Aghaei Jan 20 '20 at 15:44
  • 1
    Also to get updates from database when database changes, you need to check database for changes manually or try to find something like `SqlDependency` which works from SQL Server. – Reza Aghaei Jan 20 '20 at 15:52

0 Answers0