[QODBC-ALL] Troubleshooting - Data source name not found and no default driver specified
Posted by Jack - QODBC Support on 17 January 2018 02:27 PM
Troubleshooting - Data source name not found and no default driver specified
I have QODBC running on a terminal server.
I can use 64-bit Excel to query QODBC via the "from other sources". I have set up a 64-bit remote DSN which talks to the user DSN.
I have written a test program in .net that connects to QODBC and successfully returns data.
When I run the same code within an Excel Add-in. I get the error that it cannot find the data source name:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
This occurs on my test application when I put in a bad DSN. That is, it's not a 32/64-bit compatibility error as you get a different message.
In summary, I can successfully use QODBC in every way other than running as an Excel Add-in. Can you please advise where I have gone wrong?
The data source you are attempting to connect to does not exist on your machine.
On Windows, data sources are created by Microsoft ODBC Administrator. The available System data sources are listed in the System DSN tab. The User data sources that are available for the currently logged on user are listed in the User DSN tab.
You do not have permission to access the location where the data source is stored.
On Windows, the user account that is attempting to access the data source needs to have sufficient permissions to read the registry key where the data source is stored. System data sources are stored under HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI. User data sources are stored under HKEY_CURRENT_USER\Software\ODBC\ODBC.INI.
You are using a DSN-less connection on Windows that specifies a driver whose architecture is different to that of the applications. For example, you are using a 64-bit application, but the driver you specify in the connection string is only available as a 32-bit library. The application and ODBC driver architecture must be the same.
Please refer below mentioned link for more details: