title: MS Access OLEDB connection.open() : Unspecified error
body: <p>In nutshell, I have a VC++ dll, which connects to a MS Access (.mdb) file and read data. Two Perl scripts will load this same DLL and read same data. Only difference is that the perl scripts are in different folder (say folder 'A' &amp; folder 'B'). </p>
  
  <ol>
  <li><p>When the Perl script in Folder 'A' loads the DLL and opens the Database connection, it is successful.</p></li>
  <li><p>When the Perl script in Folder 'B' loads the DLL and opens the Database connection, it is not able to open the connection (Exception occurs).</p></li>
  </ol>
  
  <p>When I look into the Event viewer, I found the following log.</p>
  
  <pre><code>Faulting application name: perl.exe, version: 5.12.1.1201, time stamp: 0x4bed097d
  Faulting module name: msjet40.dll, version: 4.0.9756.0, time stamp: 0x49246e48
  Exception code: 0xc0000005
  Fault offset: 0x0007128f
  Faulting process id: 0x1634
  Faulting application start time: 0x01cecb4f0080e109
  Faulting application path: C:\Perl512\Perl\bin\perl.exe
  Faulting module path: C:\Windows\SysWOW64\msjet40.dll
  Report Id: 42f2cbc9-3742-11e3-91cd-001b2109685d
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ySV4d.jpg" alt="enter image description here"></p>
  
  <p><strong>OS:</strong> Windows 7 Professional 64-bit</p>
  
  <p><strong>MS Office:</strong> MS Office 2007 Standard edition (without MS Access full version, Only Access Runtime Engine is installed)</p>
  
  <p><strong>Connection string:</strong> <code>strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"D:\\Documents\\LocalFile.mdb\"";</code></p>
  
  <p><strong>Note:</strong> The DLL will always connect to the same MS Access file and uses same Connection string</p>
  
  <p>Since the script from folder 'A' is able to connect to the database, I do not think there is a problem in connection string. 
  Any Idea/clue about the root cause?</p>
  
  <p>let me know, if you need any additional details. Thanks in advance!</p>