Data source name not found and no default driver specified when reading mdb file in 64 bits OS from 64 bits app:
<p>I have a ASP.NET MVC application (64bits) running in a 64 bits Windows system (Windows Server 2012).</p>

<p>My web application needs to read a mdb database, then I created the next code:</p>

<pre><code>using (var myConnection = new OdbcConnection())
{                    
    try
    {
        string myConnectionString = @"Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + fileNameWithPath + ";Persist Security Info=True";
        myConnection.ConnectionString = myConnectionString;
        myConnection.Open();

        OdbcCommand cmd = myConnection.CreateCommand();
        cmd.CommandText = "SELECT * FROM myTable";
        OdbcDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);

        // Load the result into a DataTable
        myDataTable = new DataTable();
        myDataTable.Load(reader);
    }
    catch (Exception exception)
    {
        //nexy exception is caught here: "ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
    }
    finally
    {
        myConnection.Close();
    }
}
</code></pre>

<p>Where <strong>fileNameWithPath</strong> is the path of the mdb file.</p>

<p>When I execute the code above, I have the next annoying exception in the line</p>

<p><code>myConnection.Open();</code>:</p>

<blockquote>
  <p>ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not
  found and no default driver specified</p>
</blockquote>

<p>I've checked the server and it has the next files installed regarding ODBC driver:</p>

<p>File <strong>odbcad32.exe</strong> under the folder <strong>C:\Windows\System32</strong></p>

<p>File <strong>odbcad32.exe</strong> under the folder <strong>C:\Windows\SysWOW64</strong></p>

<p>My question is: Is my server setup correct? Do I have the 64 bits version of ODBC really installed?</p>

<p>and more important: Can I run a <strong>x64 application in x64 server with such configuration</strong>? Otherwise, is there any other alternative? It is worth to mention that:</p>

<ul>
<li>I'm <strong>not allowed</strong> to install additional software in the server </li>
<li>The <strong>web application must be 64 bits</strong></li>
</ul>

<p>Thanks in advance.</p>