Error with Sqlite

Error with Sqlite

nitinknitink Posts: 3Questions: 2Answers: 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: 3Questions: 2Answers: 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: 48,657Questions: 1Answers: 7,068 Site admin

    Perfect - thanks for the update.

    Allan

Sign In or Register to comment.