title: .NET 5 Connecting to MS Access mdb with Odbc
body: <p>I am trying to connect my web application to an old MS Access mdb file.</p>
  <p>I found this page:
  <a href="https://docs.microsoft.com/en-us/dotnet/api/system.data.odbc.odbcconnection?view=dotnet-plat-ext-6.0" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dotnet/api/system.data.odbc.odbcconnection?view=dotnet-plat-ext-6.0</a>
  But I can't figure out how to work with connection strings, I keep getting the Error:</p>
  <blockquote>
  <p>'ERROR [08001] [Microsoft][ODBC Driver 18 for SQL Server]MAX_PROVS: Error Locating Server/Instance Specified [xFFFFFFFF].
  ERROR [HYT00] [Microsoft][ODBC Driver 18 for SQL Server]Login timeout expired
  ERROR [01S00] [Microsoft][ODBC Driver 18 for SQL Server]Invalid connection string attribute
  ERROR [08001] [Microsoft][ODBC Driver 18 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.'</p>
  </blockquote>
  <p><a href="https://www.connectionstrings.com/microsoft-odbc-driver-17-for-sql-server/" rel="nofollow noreferrer">https://www.connectionstrings.com/microsoft-odbc-driver-17-for-sql-server/</a>
  Found this page, although I have the 18 driver installed it should only change the 17 -&gt; 18.</p>
  <p>My current Connection string looks like this</p>
  <blockquote>
  <p>Driver={ODBC Driver 18 for SQL Server}; Server=.\SQLExpress; AttachDbFilename = D:\temp\datacollector\microfas.mdb; Trusted_Connection=yes;</p>
  </blockquote>
  <p>But I have no idea if I am approaching it the right way. The application will eventually run locally at a customer with a known location of the .mdb file.</p>