title: ERROR [HY000] General error: Invalid file dsn ''
body: <p>I am trying to use <a href="https://gist.github.com/OnorioCatenacci/6917875" rel="noreferrer">this code snippet</a>
  And I get the following error message:</p>
  
  <pre><code>System.Data.Odbc.OdbcException (0x80131937): ERROR [HY000] General error: Invalid file dsn ''
     at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
     at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions)
     at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o
  wningObject)
     at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
     at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldC
  onnection, DbConnectionInternal&amp; connection)
     at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnecti
  onOptions userOptions)
     at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
     at System.Data.Odbc.OdbcConnection.Open()
  </code></pre>
  
  <p>The code, stripped down is:</p>
  
  <pre><code>open System
  open System.Data.Odbc
  
  let connectToAccess filename =
      let connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;FileDSN=" + filename + ";User Id=admin;Password=;"
      new OdbcConnection(connectionString)
  
  let connectToDb() =
      let accessFile = Environment.CurrentDirectory + @"\folder\filename.accdb"
      connectToAccess accessFile
  
  let connection = connectToDb()
  connection.Open()
  </code></pre>
  
  <p>I did check and verify that the path and filename are correct. I have also tried:</p>
  
  <ul>
  <li>relative paths</li>
  <li>a dummy access file (to make sure that the file is not corrupted)</li>
  <li>an older *.msb file</li>
  <li>run the code in the terminal</li>
  <li>run the code as an executable - ensuring that the path is still ok</li>
  </ul>