Error with Sqlite

Error with Sqlite

nitinknitink Posts: 17Questions: 6Answers: 1

I'm getting the following error when I try to use DataTables dll in .NET Core project

The specified invariant name 'Microsoft.Data.Sqlite' wasn't found in the list of registered .NET Data Providers.

Any idea how I can fix it?

Here is code that is creating the error

using (var db = new Database(dbType, dbConnection))
                {

This question has an accepted answers - jump to answer

Answers

  • nitinknitink Posts: 17Questions: 6Answers: 1
    Answer ✓

    I figured out the issue. In Program.cs I did not include the following line

    DbProviderFactories.RegisterFactory("Microsoft.Data.Sqlite", SqliteFactory.Instance);

    Once that was included, it is working find.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Perfect - thanks for the update.

    Allan

This discussion has been closed.