.net – ERROR : [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

datasourcenetodbcvisual-studio-2005

While connecting .net to sybase server I got this error message:

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

This has worked properly before. System DSN with same details work and data connection through vs.net also work.

I am using vs.net 2005.

Any suggestions?

Best Answer

If you're working with an x64 server, keep in mind that there are different ODBC settings for x86 and x64 applications. The "Data Sources (ODBC)" tool in the Administrative Tools list takes you to the x64 version. To view/edit the x86 ODBC settings, you'll need to run that version of the tool manually:

%windir%\SysWOW64\odbcad32.exe (%windir% is usually C:\Windows)

When your app runs as x64, it will use the x64 data sources, and when it runs as x86, it will use those data sources instead.