Search code examples
databasevisual-studioms-accessvisual-studio-2017

'Could not retrieve schema information for table or view' error in VS 2017 - M Access 2016


I'm trying to connect my Visual Studio project to a Microsoft Access database locally on my machine, I'm able to open the database correctly in Microsoft Access and I even tried making it empty of records and as simple as possible, when I'm adding it in Visual Studio and when I test the connection it says Test connection succeeded, and it's showing me the database, it can find the table name with all the fields, but when I hit finish I get an error message saying :

Could not retrieve schema information for table or view [database table name]

I'v searched a lot and I'v seen this post on StackOverflow but it did't help. I'm still getting that error, and this is a short clip on what's happening.

Can someone please help me here!


Solution

  • I finally figured it out, I opened the Visual Studio Installer and I downloaded and installed the SQL Server Package and then tried and it worked just fine.

    Knowing that I tried installing the SQL Server 2017 using a stand-alone installation but it didn't work, so you need to install it form the same Visual Studio Installer.

    Here is an image of that :

    enter image description here

    I really find it fascinating when the things that supposed to be harder than other things like problems using MySQL with PHP to control an online Databases is easier to solve than using a local databases and Microsoft Access.

    Hope this solves someone that has the same problem :)