Skip to content

InvalidOperationException: 'The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine #3

Description

@tekeroth-snapcode

When opening the Shapfile, I get this:

InvalidOperationException: 'The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.'

Found a SO thread on it:
https://stackoverflow.com/questions/1991643/microsoft-jet-oledb-4-0-provider-is-not-registered-on-the-local-machine

But installing that driver does not change anything for me, nor do I have any connectionStrings, as they talk about.

Running Win11, dotnet framework 4.7, VS 2022.

Activity

  1. abfo commented on Nov 15, 2023

    @abfo
    Owner

    There are two ways to handle this. If you target your application at 32-bit (x86) then the JET driver should work. You can also install System.Data.OleDb and try the alternate connection string ConnectionStringTemplateAce in Shapefile.

  2. tekeroth-snapcode commented on Nov 15, 2023

    @tekeroth-snapcode
    Author

    Hello! Where does one set the connection string?

  3. abfo commented on Nov 15, 2023

    @abfo
    Owner

    There is a constructor overload that takes the connection string as an argument, and there are two defined options for JET and ACE in Shapefile. The default is JET.

  4. eithe commented on Jan 3, 2024

    @eithe

    I guess this means that using this library in a .NET 7 application running on 64bit linux is not supported @abfo ?

  5. abfo commented on Jan 6, 2024

    @abfo
    Owner

    Not something I've tried. You could install System.Data.OleDb and experiment with the connection string. I think that package should work on Linux.

  6. eithe commented on Jan 9, 2024

    @eithe

    Thanks for the suggestion, @abfo, but unfortunately System.Data.OleDb is not supported on Linux even though the package is available for .NET core/6/7/8. Getting "System.Data.OleDb is not supported on this platform" when on Linux.

    For anyone else seeing this: I wasn't very good at researching when I first looked for Shapefile readers in .NET. Now I see that NetTopologySuite (which we actually already have in our project) supports reading Shapefiles through ShapefileDataReader.

  7. abfo commented on Jan 11, 2024

    @abfo
    Owner

    Sorry to hear that, and glad you found a solution that works for you.

  8. linked a pull request that will close this issueReplace OleDb metadata access with DbfDataReader #5on Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions