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?
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.
I got a similar error, which was resolved by installing the corresponding MySQL drivers from:
http://www.connectionstrings.com/mysql-connector-odbc-5-2/info-and-download/
and by performing the following steps:
- Go to IIS and Application Pools in the left menu.
- Select relevant application pool which is assigned to the project.
- Click the Set Application Pool Defaults.
- In General Tab, set the Enable 32 Bit Application entry to "True".
Reference:
http://www.codeproject.com/Tips/305249/ERROR-IM-Microsoft-ODBC-Driver-Manager-Data-sou
For anyone coming to this latterly, I was having this problem over a Windows network, and offer an additional thing to check:
Python script connecting would work from commandline on my (linux) machine, but some users had problems connecting - that it worked from CLI suggested the DSN and credentials were right. The issue for us was that the group security policy required the ODBC credentials to be set on every machine. Once we added that (for some reason, the user had three of the four ODBC credentials they needed for our various systems), they were able to connect.
You can of course do that at group level, but as it was a simple omission on the part of one machine, I did it in Control Panel > ODBC Drivers > New
Perform the following steps:
- Start the Registry Editor by typing
regedit
in the Run window.
- Select the following key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC
.
- In the Security menu, click Permissions.
- Grant Full Permission to the account which is being used for making connections.
- Quit the Registry Editor.