Saturday 22 January 2011

Voodoo Visual Studio

While I was - uh - researching the previous post I fired up VS2008 and tried to establish a connection to a Microsoft access database via Server Explorer. I got this dialog...

instead of this dialog.

'Test Connection' invariably returns 'OK'. The advanced button remains grayed out. Clicking OK invariably yelds the message 'Format of the initialization string does not conform to the specification starting at index 0', even typing a perfectly valid Jet 4.0 connection string. Invoking the .NET OleDb provider directly from Server Explorer and linking it to Jet 4.0 driver seems to work, at first, but then an 'Object reference not set to an object instance' message stops everything. Programatically, using OleDb+Jet poses no problem whatsoever. I have also VS2005 on the same machine: same problem. And VS2010: no problem at all.

I spent quite a bit of time online searching for a solution. It looks like something related to a deleted registration (and I actually ran a registry cleaner utility a few months ago), even if it's strange that VS2010's working in this case. I found these solutions:

- regsvr32 query.dll
- checking if the default value of the ProgID subkey of registry key HKEY_CLASSES_ROOT\CLSID\{F9AE8980-7E52-11d0-8964-00C04FD611D7} is set to MSIDXS.1
- reinstalling/re-registering MDAC
- deleting invalid SQL Server connections from Server Explorer
- devenv /ResetSkiPkgs (devenv.exe is the VS2008 ide)

None of them worked. The problem seems to be relatively widespread, M$ knows about it, but the only surefire solution seems to be a complete reinstall (which is a major waste of time). I'm lucky not to really need the feature and to have several other machines where VS works...

No comments:

Post a Comment