ODBC Driver Manager – Data source name not found and no default driver specified

While migrating an application from MSSQL 2005 and Server 2003 to MSSQL 2008 x64 and Server 2008 x64, I ran into an problem with the ODBC connection. The application uses a System DSN to connect to my BlackBerry Enterprise Server, BESMgmt. Settings were identical on both boxes, and verification within the ODBC manager worked.

When I tried to verify the DSN from within the app, I received the following error:

Can't connect, error [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

A variant of this error is:

Microsoft OLE DB Provider for Microsoft OLE DB Provider for ODBC Drivers (0×80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Most of the search results for that error turned up permission problems, and recommended explicitly granting access to the Registry key at the HKLM\SOFTWARE\ODBC\ODBC.INI. This wasn't my problem, and is also the reason that User DSNs exist.

It turns out that if you launch the ODBC Manager from the Start menu, you're getting the 64-bit version. 32-bit applications don't see DSNs created in the 64-bit ODBC Manager, and will fail one of the errors above.

The 32-bit ODBC Manager is located at C:\Windows\SysWOW64\odbcad32.exe

Launch that to manage DSNs for 32-bit applications and resolve this error.

 

Tags: , , , , , , , , , ,

9 Responses to “ODBC Driver Manager – Data source name not found and no default driver specified”

  1. Klaas Polinder Says:

    Thanks!

  2. rodjim Says:

    Thank you very much, your post just solve my problem.

  3. Christopher Bottoms Says:

    I am still getting the same error from my Visual Basic 6.0 application: "ODBC Driver Manager – Data source name not found and no default driver specified".

    I can see the DSN and it tests fine, using the 32-bit ODBC Driver Manager.

    Thanks for the article. I did not know about the 32-bit Driver Manager before.

  4. Jerry Says:

    Wow, this was the one thing I needed; I was banging my head over this for hours. Grr to MSFT for defaulting to 64 bit (or at least not warning you about it).

  5. Christopher Bottoms Says:

    I also needed to alter the registry to make my program work correctly. See this StackOverflow question for more details: http://stackoverflow.com/questions/1134827.

  6. Radu Says:

    Hi
    Thanks a lot for this tip, you made same people very happy.

    Thanks a lot.

  7. CompuManic Says:

    Perfect! This helped me a lot.

  8. OldCoder Says:

    This is exactly what I needed to know. Just couldn't figure out why this old code no longer worked. But in the year since I last worked on this code I got a 64-bit computer. D'oh!

  9. Wyniki Joker Says:

    Thanks!

    All the best,
    Wyniki Joker

Leave a Reply


© 2007-2013, Corey Gilmore | Posts RSS Feed | Comments RSS Feed | Contact

 

The views expressed on these pages are mine alone and not those of any past or present employer. All information presented on this site was obtained lawfully and not through disclosure under the terms of an NDA.