Search code examples
databasevb.netvisual-studio-2010ms-accessjet

Visual Studio VB.NET Database Explorer "Unspecified Error"


I have been searching all day for a solution to this problem, but can not find one that works. Basically, I have been connecting to an Access Database through Visual Studio for some time now (there is a reason why I am using Access Database), but all of the sudden it will not connect. Now, anytime I try to add a database connection I receive "Unspecified Error". I have searched here, read MSDN, reinstalled Visual Studio, but nothing seems to work. If I go to "Database Explorer", change to Access Database, browse for file, and hit "Test Connection"/"OK", I will receive the error. It is not file specific either, it is happening to all.

Any ideas? Really need some help here.


Solution

  • Some thoughts that may help:

    • make sure your project is explicitly targeting x86 code, and not x64 or AnyCPU.
      Access Jet (.mdb) only works under 32bit and if you are using ACE (for the new .accdb database format), you are likely using the 32 bit version of the driver as well.
      You cannot mix 32bit and 64bit code and database drivers, just make sure everything is consistent.

    • you may have suffered a corruption of your installation.
      If you can perform the same steps on another machine and if it works there, then you may need to re-install VS (try re-installing the ACE driver first to see if it solves the issue).